- Timestamp:
- Aug 31, 2018 9:46:25 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/UIChooserItemMachine.cpp
r73962 r73989 47 47 : UIChooserItem(pParent, pParent->isTemporary()) 48 48 , UIVirtualMachineItem(machine) 49 , m_iHoverLightness(0) 50 , m_iHighlightLightness(0) 51 , m_iHoverHighlightLightness(0) 49 , m_iHoverLightnessMin(0) 50 , m_iHoverLightnessMax(0) 51 , m_iHighlightLightnessMin(0) 52 , m_iHighlightLightnessMax(0) 52 53 , m_iFirstRowMaximumWidth(0) 53 54 , m_iMinimumNameWidth(0) … … 82 83 : UIChooserItem(pParent, pParent->isTemporary()) 83 84 , UIVirtualMachineItem(pCopyFrom->machine()) 84 , m_iHoverLightness(0) 85 , m_iHighlightLightness(0) 86 , m_iHoverHighlightLightness(0) 85 , m_iHoverLightnessMin(0) 86 , m_iHoverLightnessMax(0) 87 , m_iHighlightLightnessMin(0) 88 , m_iHighlightLightnessMax(0) 87 89 , m_iFirstRowMaximumWidth(0) 88 90 , m_iMinimumNameWidth(0) … … 585 587 /* Colors: */ 586 588 #ifdef VBOX_WS_MAC 587 m_iHighlightLightness = 115; 588 m_iHoverLightness = 110; 589 m_iHoverHighlightLightness = 120; 589 m_iHighlightLightnessMin = 105; 590 m_iHighlightLightnessMax = 115; 591 m_iHoverLightnessMin = 110; 592 m_iHoverLightnessMax = 120; 590 593 #else /* VBOX_WS_MAC */ 591 m_iHighlightLightness = 130; 592 m_iHoverLightness = 155; 593 m_iHoverHighlightLightness = 175; 594 m_iHighlightLightnessMin = 120; 595 m_iHighlightLightnessMax = 160; 596 m_iHoverLightnessMin = 155; 597 m_iHoverLightnessMax = 175; 594 598 #endif /* !VBOX_WS_MAC */ 595 599 … … 909 913 /* Draw gradient: */ 910 914 QLinearGradient bgGrad(rect.topLeft(), rect.bottomLeft()); 911 bgGrad.setColorAt(0, highlight.lighter(m_iHighlightLightness ));912 bgGrad.setColorAt(1, highlight );915 bgGrad.setColorAt(0, highlight.lighter(m_iHighlightLightnessMax)); 916 bgGrad.setColorAt(1, highlight.lighter(m_iHighlightLightnessMin)); 913 917 pPainter->fillRect(rect, bgGrad); 914 918 } … … 920 924 /* Draw gradient: */ 921 925 QLinearGradient bgGrad(rect.topLeft(), rect.bottomLeft()); 922 bgGrad.setColorAt(0, highlight.lighter(m_iHover HighlightLightness));923 bgGrad.setColorAt(1, highlight.lighter(m_iHoverLightness ));926 bgGrad.setColorAt(0, highlight.lighter(m_iHoverLightnessMax)); 927 bgGrad.setColorAt(1, highlight.lighter(m_iHoverLightnessMin)); 924 928 pPainter->fillRect(rect, bgGrad); 925 929 } … … 993 997 QPalette pal = palette(); 994 998 QColor highlight = pal.color(QPalette::Active, QPalette::Highlight); 995 QColor hhl = highlight.lighter(m_iHover HighlightLightness);999 QColor hhl = highlight.lighter(m_iHoverLightnessMax); 996 1000 if (hhl.value() - hhl.saturation() > 0) 997 1001 pPainter->setPen(pal.color(QPalette::Active, QPalette::Text)); -
trunk/src/VBox/Frontends/VirtualBox/src/manager/chooser/UIChooserItemMachine.h
r73962 r73989 265 265 /** @name Item stuff. 266 266 * @{ */ 267 /** Holds item hover lightness. */ 268 int m_iHoverLightness; 269 /** Holds item highlight lightness. */ 270 int m_iHighlightLightness; 271 /** Holds item hover highlight lightness. */ 272 int m_iHoverHighlightLightness; 267 /** Holds item minimum hover lightness. */ 268 int m_iHoverLightnessMin; 269 /** Holds item maximum hover lightness. */ 270 int m_iHoverLightnessMax; 271 /** Holds item minimum highlight lightness. */ 272 int m_iHighlightLightnessMin; 273 /** Holds item maximum highlight lightness. */ 274 int m_iHighlightLightnessMax; 273 275 274 276 /** Holds item pixmap. */
Note:
See TracChangeset
for help on using the changeset viewer.