VirtualBox

Changeset 77275 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Feb 12, 2019 12:25:20 PM (6 years ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9072: Restore the highlight text color fix r128070.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/logviewer
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.cpp

    r77221 r77275  
    196196    , m_iMatchCount(0)
    197197{
     198    configure();
     199    prepare();
     200}
     201
     202void UIVMLogViewerTextEdit::configure()
     203{
    198204    setMouseTracking(true);
    199     //setStyleSheet("background-color: rgba(240, 240, 240, 75%) ");
    200     prepare();
     205
     206    /* Prepare modified standard palette: */
     207    QPalette pal = style() ? style()->standardPalette() : palette(); // fallback if no style exist.
     208    pal.setColor(QPalette::Inactive, QPalette::Highlight, pal.color(QPalette::Active, QPalette::Highlight));
     209    pal.setColor(QPalette::Inactive, QPalette::HighlightedText, pal.color(QPalette::Active, QPalette::HighlightedText));
     210    setPalette(pal);
     211
     212    /* Configure this' wrap mode: */
     213    setWrapLines(false);
     214    setReadOnly(true);
    201215}
    202216
     
    220234    if (pHorizontalScrollBar)
    221235        pHorizontalScrollBar->setStyleSheet(horizontalScrollBarStyle);
    222 
    223     /* Configure this' wrap mode: */
    224     setWrapLines(false);
    225     setReadOnly(true);
    226236}
    227237
     
    380390    QIWithRetranslateUI<QPlainTextEdit>::paintEvent(pEvent);
    381391
    382     /** Draw an overlay with text in it to show the number of search matches: */
     392    /* Draw an overlay with text in it to show the number of search matches: */
    383393    if (viewport() && (m_fShowSearchResultOverlay || m_bShownTextIsFiltered))
    384394    {
     
    397407            strText.append(UIVMLogViewerWidget::tr("Filtered"));
    398408        }
    399         /** Space between the text and rectangle border. */
     409        /* Space between the text and rectangle border: */
    400410        QSize textMargin(5, 5);
    401         /** Space between the rectangle and viewport edges. */
     411        /* Space between the rectangle and viewport edges: */
    402412        QSize rectMargin(2, 2);
    403413
  • trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerTextEdit.h

    r77087 r77275  
    9090private:
    9191
     92    /** Configures this (such as palette etc.) */
     93    void configure();
    9294    void prepare();
    9395    void prepareWidgets();
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette