Changeset 108009 in vbox
- Timestamp:
- Jan 31, 2025 9:09:30 PM (3 weeks ago)
- svn:sync-xref-src-repo-rev:
- 167281
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
r108008 r108009 437 437 setFlag(QGraphicsItem::ItemIsSelectable, false); 438 438 439 /* Prepare hover animation: */ 440 prepareHoverAnimation(); 439 /* Prepare hover animation for popup mode only: */ 440 if (model()->tools()->isPopup()) 441 prepareHoverAnimation(); 441 442 /* Prepare connections: */ 442 443 prepareConnections(); … … 732 733 pPainter->fillRect(tokenRect, hlGrad); 733 734 } 735 736 /* Hovering background for widget: */ 737 if (isHovered()) 738 { 739 /* Configure painter: */ 740 pPainter->setRenderHint(QPainter::Antialiasing, true); 741 /* Acquire background color: */ 742 const QColor backgroundColor = pal.color(QPalette::Window); 743 744 /* Prepare icon sub-rect: */ 745 QRect subRect; 746 subRect.setHeight(24 + 4 * 2); 747 subRect.setWidth(subRect.height()); 748 subRect.moveCenter(rectangle.center()); 749 750 /* Paint icon frame: */ 751 QPainterPath painterPath; 752 painterPath.addRoundedRect(subRect, 4, 4); 753 const QColor backgroundColor1 = uiCommon().isInDarkMode() 754 ? backgroundColor.lighter(110) 755 : backgroundColor.darker(105); 756 pPainter->setPen(QPen(backgroundColor1, 2, Qt::SolidLine, Qt::RoundCap)); 757 pPainter->drawPath(QPainterPathStroker().createStroke(painterPath)); 758 759 /* Fill icon body: */ 760 pPainter->setClipPath(painterPath); 761 const QColor backgroundColor2 = uiCommon().isInDarkMode() 762 ? backgroundColor.lighter(180) 763 : backgroundColor.darker(140); 764 pPainter->fillRect(subRect, backgroundColor2); 765 } 734 766 } 735 767
Note:
See TracChangeset
for help on using the changeset viewer.