Changeset 43910 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Nov 19, 2012 10:04:39 AM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.cpp ¶
r42799 r43910 101 101 /* Prepare variables: */ 102 102 QPalette pal = palette(); 103 QColor backgroundColor = pal.color(m_fParentSelected ? QPalette::Highlight : QPalette::Window); 104 QColor buttonColor = pal.color(QPalette::Window); 105 if (backgroundColor.lightness() > 170) 106 buttonColor = buttonColor.darker(160); 107 else 108 buttonColor = buttonColor.darker(99); 103 QColor buttonColor = pal.color(m_fParentSelected ? QPalette::HighlightedText : QPalette::Mid); 104 #ifdef Q_WS_MAC 105 /* Mac is using only light standard highlight colors, keeping highlight-text color always black. 106 * User can choose a darker (non-standard) highlight color but it will be his visibility problem. 107 * I think using highlight-text color (black) for arrow-buttons is too ugly, 108 * so the corresponding color will be received from the highlight color: */ 109 if (m_fParentSelected) 110 buttonColor = pal.color(QPalette::Highlight).darker(150); 111 #endif /* Q_WS_MAC */ 109 112 110 113 /* Setup: */ … … 136 139 /* Prepare variables: */ 137 140 QPalette pal = palette(); 138 QColor backgroundColor = pal.color(m_fParentSelected ? QPalette::Highlight : QPalette::Window); 139 QColor buttonColor = pal.color(QPalette::Window); 140 if (backgroundColor.lightness() > 170) 141 buttonColor = buttonColor.darker(160); 142 else 143 buttonColor = buttonColor.darker(99); 141 QColor buttonColor = pal.color(m_fParentSelected ? QPalette::HighlightedText : QPalette::Mid); 142 #ifdef Q_WS_MAC 143 /* Mac is using only light standard highlight colors, keeping highlight-text color always black. 144 * User can choose a darker (non-standard) highlight color but it will be his visibility problem. 145 * I think using highlight-text color (black) for arrow-buttons is too ugly, 146 * so the corresponding color will be received from the highlight color: */ 147 if (m_fParentSelected) 148 buttonColor = pal.color(QPalette::Highlight).darker(150); 149 #endif /* Q_WS_MAC */ 144 150 145 151 /* Setup: */
Note:
See TracChangeset
for help on using the changeset viewer.