- Timestamp:
- Dec 24, 2024 10:26:51 AM (4 months ago)
- svn:sync-xref-src-repo-rev:
- 166445
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
r107388 r107396 444 444 /* Paint background: */ 445 445 paintBackground(pPainter, rectangle); 446 /* Paint frame: */ 447 paintFrame(pPainter, rectangle); 446 /* Paint frame for popup only: */ 447 if (model()->tools()->isPopup()) 448 paintFrame(pPainter, rectangle); 448 449 /* Paint tool info: */ 449 450 paintToolInfo(pPainter, rectangle); … … 743 744 const QPalette pal = QApplication::palette(); 744 745 745 /* Selection background: */ 746 if (model()->currentItem() == this) 746 /* Selection background for popup: */ 747 if ( model()->currentItem() == this 748 && model()->tools()->isPopup()) 747 749 { 748 750 /* Prepare color: */ … … 782 784 } 783 785 } 786 /* Selection background for widget: */ 787 else if ( model()->currentItem() == this 788 && !model()->tools()->isPopup()) 789 790 { 791 /* Prepare color: */ 792 const QColor highlightColor = isEnabled() 793 ? pal.color(QPalette::Active, QPalette::Highlight) 794 : pal.color(QPalette::Disabled, QPalette::Highlight); 795 QRect tokenRect(rectangle.topLeft() + QPoint(0, 4), 796 QSize(4, rectangle.height() - 8)); 797 /* Draw gradient token: */ 798 QLinearGradient hlGrad(tokenRect.topLeft(), tokenRect.bottomLeft()); 799 hlGrad.setColorAt(0, highlightColor.darker(m_iHighlightLightnessStart)); 800 hlGrad.setColorAt(1, highlightColor.darker(m_iHighlightLightnessFinal)); 801 pPainter->fillRect(tokenRect, hlGrad); 802 } 784 803 /* Hovering background: */ 785 804 else if (isHovered()) … … 821 840 } 822 841 } 823 /* Default background : */824 else 842 /* Default background for popup only: */ 843 else if (model()->tools()->isPopup()) 825 844 { 826 845 /* Prepare color: */
Note:
See TracChangeset
for help on using the changeset viewer.