- Timestamp:
- Sep 8, 2014 6:51:05 PM (11 years ago)
- svn:sync-xref-src-repo-rev:
- 95954
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp
r52402 r52649 206 206 const QIcon icon = gpConverter->toIcon(m_type); 207 207 /* Cache button size-hint: */ 208 m_size = icon.availableSizes().first(); 208 QStyleOptionButton option; 209 option.initFrom(this); 210 const QRect minRect = QApplication::style()->subElementRect(QStyle::SE_CheckBoxIndicator, &option); 211 m_size = icon.availableSizes().first().expandedTo(minRect.size()); 209 212 /* Cache pixmap of same size: */ 210 213 m_pixmap = icon.pixmap(m_size); … … 233 236 /* Create style-painter: */ 234 237 QStylePainter painter(this); 235 QStyleOption option; 238 /* Prepare option set for check-box: */ 239 QStyleOptionButton option; 236 240 option.initFrom(this); 241 /* Use the size of 'this': */ 237 242 option.rect = QRect(0, 0, width(), height()); 243 /* But do not use hover bit of 'this' since 244 * we already have another hovered-state representation: */ 245 if (option.state & QStyle::State_MouseOver) 246 option.state &= ~QStyle::State_MouseOver; 238 247 /* Remember checked-state: */ 239 248 if (m_fChecked) … … 241 250 /* Draw check-box for hovered-state: */ 242 251 if (m_fHovered) 243 painter.draw Primitive(QStyle::PE_IndicatorCheckBox, option);252 painter.drawControl(QStyle::CE_CheckBox, option); 244 253 /* Draw pixmap for unhovered-state: */ 245 254 else
Note:
See TracChangeset
for help on using the changeset viewer.