Changeset 74079 in vbox
- Timestamp:
- Sep 5, 2018 11:40:11 AM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.cpp
r74078 r74079 53 53 , m_fClosed(false) 54 54 , m_iAdditionalHeight(0) 55 , m_iCornerRadius(0) 56 , m_iBlackoutDarkness(0) 55 , m_iHeaderDarkness(110) 57 56 , m_pToggleButton(0) 58 57 , m_pEnterButton(0) … … 85 84 , m_fClosed(pCopyFrom->isClosed()) 86 85 , m_iAdditionalHeight(0) 87 , m_iCornerRadius(0) 88 , m_iBlackoutDarkness(0) 86 , m_iHeaderDarkness(110) 89 87 , m_strName(pCopyFrom->name()) 90 88 , m_pToggleButton(0) … … 121 119 , m_fClosed(!fOpened) 122 120 , m_iAdditionalHeight(0) 123 , m_iCornerRadius(0) 124 , m_iBlackoutDarkness(0) 121 , m_iHeaderDarkness(110) 125 122 , m_strName(strName) 126 123 , m_pToggleButton(0) … … 168 165 , m_fClosed(pCopyFrom->isClosed()) 169 166 , m_iAdditionalHeight(0) 170 , m_iCornerRadius(0) 171 , m_iBlackoutDarkness(0) 167 , m_iHeaderDarkness(110) 172 168 , m_strName(pCopyFrom->name()) 173 169 , m_pToggleButton(0) … … 1207 1203 void UIChooserItemGroup::prepare() 1208 1204 { 1209 /* Buttons: */1210 m_pToggleButton = 0;1211 m_pEnterButton = 0;1212 m_pExitButton = 0;1213 /* Name editor: */1214 m_pNameEditorWidget = 0;1215 m_pNameEditor = 0;1216 1205 /* Painting stuff: */ 1217 m_iAdditionalHeight = 0;1218 m_iCornerRadius = 10;1219 m_iBlackoutDarkness = 110;1220 1206 m_nameFont = font(); 1221 1207 m_nameFont.setWeight(QFont::Bold); … … 1648 1634 model()->currentItems().contains(this) ? 1649 1635 QPalette::Highlight : QPalette::Midlight); 1650 QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker( blackoutDarkness());1636 QColor bodyColor = pal.color(QPalette::Active, QPalette::Midlight).darker(headerDarkness()); 1651 1637 1652 1638 /* Root-item: */ … … 1671 1657 /* Fill background: */ 1672 1658 QLinearGradient headerGradient(headerRect.bottomLeft(), headerRect.topLeft()); 1673 headerGradient.setColorAt(1, headerColor.darker( blackoutDarkness()));1659 headerGradient.setColorAt(1, headerColor.darker(headerDarkness())); 1674 1660 headerGradient.setColorAt(0, headerColor.darker(animatedValue())); 1675 1661 pPainter->fillRect(headerRect, headerGradient); … … 1690 1676 QLinearGradient tGradient(tRect.bottomLeft(), tRect.topLeft()); 1691 1677 tGradient.setColorAt(1, headerColor.darker(animatedValue())); 1692 tGradient.setColorAt(0, headerColor.darker( blackoutDarkness()));1678 tGradient.setColorAt(0, headerColor.darker(headerDarkness())); 1693 1679 /* Fill top rectangle: */ 1694 1680 pPainter->fillRect(tRect, tGradient); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemGroup.h
r74002 r74079 263 263 bool isMainRoot() const { return m_fMainRoot; } 264 264 265 /** Returns blackout itemdarkness. */266 int blackoutDarkness() const { return m_iBlackoutDarkness; }265 /** Returns item's header darkness. */ 266 int headerDarkness() const { return m_iHeaderDarkness; } 267 267 268 268 /** Defines @a iAdditionalHeight. */ … … 324 324 /** Holds aditional height. */ 325 325 int m_iAdditionalHeight; 326 /** Holds corner radious. */ 327 int m_iCornerRadius; 328 /** Holds blackout item darkness. */ 329 int m_iBlackoutDarkness; 326 /** Holds the header darkness. */ 327 int m_iHeaderDarkness; 330 328 331 329 /** Holds the cached name. */
Note:
See TracChangeset
for help on using the changeset viewer.