VirtualBox

Changeset 49472 in vbox for trunk/src/VBox


Ignore:
Timestamp:
Nov 13, 2013 5:17:21 PM (11 years ago)
Author:
vboxsync
Message:

FE/Qt: 7092: QIRichTextLabel should use proper text colors.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIRichTextLabel.cpp

    r45489 r49472  
    3333    /* Setup self: */
    3434    setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed);
     35
    3536    /* Setup text-edit: */
    3637    m_pTextEdit->setReadOnly(true);
    3738    m_pTextEdit->setFocusPolicy(Qt::NoFocus);
    3839    m_pTextEdit->setFrameShape(QFrame::NoFrame);
    39     m_pTextEdit->viewport()->setAutoFillBackground(false);
    4040    m_pTextEdit->setVerticalScrollBarPolicy(Qt::ScrollBarAlwaysOff);
    4141    m_pTextEdit->setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
     42
     43    /* Tune text-edit viewport palette: */
     44    m_pTextEdit->viewport()->setAutoFillBackground(false);
     45    QPalette pal = m_pTextEdit->viewport()->palette();
     46    pal.setColor(QPalette::Active,   QPalette::Text, pal.color(QPalette::Active,   QPalette::WindowText));
     47    pal.setColor(QPalette::Inactive, QPalette::Text, pal.color(QPalette::Inactive, QPalette::WindowText));
     48    pal.setColor(QPalette::Disabled, QPalette::Text, pal.color(QPalette::Disabled, QPalette::WindowText));
     49    m_pTextEdit->viewport()->setPalette(pal);
     50
    4251    /* Add into parent: */
    4352    QVBoxLayout *pMainLayout = new QVBoxLayout(this);
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