- Timestamp:
- Jan 25, 2019 10:36:13 AM (6 years ago)
- svn:sync-xref-src-repo-rev:
- 128390
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.cpp
r76606 r76983 32 32 , m_icon(icon) 33 33 , m_fParentSelected(false) 34 , m_dIconScaleIndex(0) 34 35 { 35 36 /* Refresh finally: */ … … 45 46 } 46 47 48 void UIGraphicsButton::setIconScaleIndex(double dIndex) 49 { 50 if (dIndex >= 0) 51 m_dIconScaleIndex = dIndex; 52 } 53 54 double UIGraphicsButton::iconScaleIndex() const 55 { 56 return m_dIconScaleIndex; 57 } 58 47 59 QVariant UIGraphicsButton::data(int iKey) const 48 60 { … … 53 65 case GraphicsButton_IconSize: 54 66 { 55 const int iMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 67 int iMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); 68 if (m_dIconScaleIndex > 0) 69 iMetric *= m_dIconScaleIndex; 56 70 return QSize(iMetric, iMetric); 57 71 } -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/graphics/UIGraphicsButton.h
r76581 r76983 51 51 void setParentSelected(bool fParentSelected); 52 52 53 /** Defines icon scale @a dIndex. */ 54 void setIconScaleIndex(double dIndex); 55 /** Returns icon scale index. */ 56 double iconScaleIndex() const; 57 53 58 protected: 54 59 … … 82 87 QIcon m_icon; 83 88 bool m_fParentSelected; 89 90 /** Holds the icon scale index. */ 91 double m_dIconScaleIndex; 84 92 }; 85 93
Note:
See TracChangeset
for help on using the changeset viewer.