Changeset 108352 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Feb 24, 2025 1:23:33 PM (8 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167712
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
r108351 r108352 736 736 if (model()->currentItem(itemClass()) == this) 737 737 { 738 /* Acquire background color: */ 739 #ifdef VBOX_WS_MAC 740 const QColor selectionColor = uiCommon().isInDarkMode() 741 ? pal.color(QPalette::Active, QPalette::Button).lighter(150) 742 : pal.color(QPalette::Active, QPalette::Button).darker(150); 743 #else 744 const QColor selectionColor = uiCommon().isInDarkMode() 745 ? pal.color(QPalette::Active, QPalette::Accent) 746 : pal.color(QPalette::Active, QPalette::Accent); 747 #endif 748 QColor selectionColor1 = selectionColor; 749 QColor selectionColor2 = selectionColor; 750 if (model()->showItemNames()) 751 { 752 selectionColor1.setAlpha(0); 753 selectionColor2.setAlpha(255); 754 } 755 else 756 { 757 selectionColor1.setAlpha(100); 758 selectionColor2.setAlpha(110); 759 } 760 761 /* Draw gradient token: */ 762 QLinearGradient hlGrad(rectangle.topLeft(), rectangle.topRight()); 763 hlGrad.setColorAt(0, selectionColor1); 764 hlGrad.setColorAt(1, selectionColor2); 765 pPainter->fillRect(rectangle, hlGrad); 766 738 767 /* Acquire token color: */ 739 768 const QColor highlightColor = isEnabled() … … 741 770 : pal.color(QPalette::Disabled, QPalette::Highlight); 742 771 const QColor highlightColor1 = uiCommon().isInDarkMode() 743 ? highlightColor.lighter(1 30)744 : highlightColor.darker(1 30);772 ? highlightColor.lighter(160) 773 : highlightColor.darker(160); 745 774 const QColor highlightColor2 = uiCommon().isInDarkMode() 746 ? highlightColor.lighter(1 10)747 : highlightColor.darker(1 10);775 ? highlightColor.lighter(140) 776 : highlightColor.darker(140); 748 777 749 778 /* Depending on item class: */ … … 790 819 791 820 /* Hovering background for widget: */ 792 if (isHovered())821 else if (isHovered()) 793 822 { 794 823 /* Prepare variables: */
Note:
See TracChangeset
for help on using the changeset viewer.