Changeset 74962 in vbox
- Timestamp:
- Oct 21, 2018 1:48:50 PM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 125980
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsItem.cpp
r74599 r74962 32 32 33 33 /* GUI includes: */ 34 # include "UIImageTools.h" 34 35 # include "UITools.h" 35 36 # include "UIToolsItem.h" … … 713 714 bgGrad.setColorAt(1, backgroundColor.lighter(m_iHighlightLightnessMin)); 714 715 pPainter->fillRect(rectangle, bgGrad); 715 }716 } 716 717 /* Hovering background: */ 717 718 else if (isHovered()) … … 726 727 bgGrad.setColorAt(1, backgroundColor.lighter(m_iHoverLightnessMin)); 727 728 pPainter->fillRect(rectangle, bgGrad); 728 }729 } 729 730 /* Default background: */ 730 731 else … … 747 748 void UIToolsItem::paintFrame(QPainter *pPainter, const QRect &rectangle) const 748 749 { 750 /* Don't paint frame for disabled items: */ 751 if (!isEnabled()) 752 return; 753 749 754 /* Save painter: */ 750 755 pPainter->save(); … … 827 832 int iPixmapY = (iFullHeight - m_pixmap.height() / m_pixmap.devicePixelRatio()) / 2; 828 833 /* Paint pixmap: */ 829 paintPixmap(/* Painter: */ 830 pPainter, 831 /* Point to paint in: */ 832 QPoint(iPixmapX, iPixmapY), 833 /* Pixmap to paint: */ 834 m_pixmap); 834 // WORKAROUND: 835 // We have no disabled tool icons for now. 836 // So we will emulate that functionality. 837 // Maybe one day we should do that everywhere? 838 /// @todo just use proper icons! 839 if (!isEnabled()) 840 paintPixmap(/* Painter: */ 841 pPainter, 842 /* Point to paint in: */ 843 QPoint(iPixmapX, iPixmapY), 844 /* Pixmap to paint: */ 845 QPixmap::fromImage(toGray(m_pixmap.toImage()))); 846 else 847 paintPixmap(/* Painter: */ 848 pPainter, 849 /* Point to paint in: */ 850 QPoint(iPixmapX, iPixmapY), 851 /* Pixmap to paint: */ 852 m_pixmap); 835 853 } 836 854
Note:
See TracChangeset
for help on using the changeset viewer.