VirtualBox

Changeset 23444 in vbox for trunk/src/VBox/Frontends


Ignore:
Timestamp:
Sep 30, 2009 3:34:26 PM (15 years ago)
Author:
vboxsync
Message:

FE/Qt4: New Storage UI: Tree-View foreground color fix.

File:
1 edited

Legend:

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

    r23438 r23444  
    14201420
    14211421    /* Setup foregroung settings */
    1422     bool isEnabled = state & QStyle::State_Enabled;
    1423     bool isActive = state & QStyle::State_Active;
     1422    QPalette::ColorGroup cg = state & QStyle::State_Active ? QPalette::Active : QPalette::Inactive;
     1423    bool isSelected = state & QStyle::State_Selected;
    14241424    bool isFocused = state & QStyle::State_HasFocus;
    1425     bool isGrayOnLoosingFocus = QApplication::style()->styleHint (QStyle::SH_ItemView_ChangeHighlightOnFocus, &aOption) == 0;
    1426     QPalette::ColorGroup cg = isEnabled && (isActive || !isGrayOnLoosingFocus) ? QPalette::Active :
    1427                               isEnabled ? QPalette::Inactive : QPalette::Disabled;
    1428     aPainter->setPen (aOption.palette.color (cg, isFocused ? QPalette::HighlightedText : QPalette::Text));
     1425    bool isGrayOnLoosingFocus = QApplication::style()->styleHint (QStyle::SH_ItemView_ChangeHighlightOnFocus, &aOption) != 0;
     1426    aPainter->setPen (aOption.palette.color (cg, isSelected && (isFocused || !isGrayOnLoosingFocus) ?
     1427                                             QPalette::HighlightedText : QPalette::Text));
    14291428
    14301429    aPainter->translate (rect.x(), rect.y());
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