Changeset 55880 in vbox
- Timestamp:
- May 15, 2015 5:50:47 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/VBoxSnapshotsWgt.cpp
r55214 r55880 103 103 .arg (QTreeWidgetItem::data (aColumn, Qt::DisplayRole).toString()) 104 104 .arg (QTreeWidgetItem::data (aColumn, Qt::UserRole).toString())); 105 case Qt::SizeHintRole: 106 { 107 /* Determine the icon metric: */ 108 const QStyle *pStyle = QApplication::style(); 109 const int iIconMetric = pStyle->pixelMetric(QStyle::PM_SmallIconSize); 110 /* Determine the minimum size-hint for this tree-widget-item: */ 111 const QSize baseSizeHint = QTreeWidgetItem::data(aColumn, aRole).toSize(); 112 /* Determine the effective height-hint for this tree-widget-item: */ 113 const int iEffectiveHeightHint = qMax(baseSizeHint.height(), 114 iIconMetric + 2 * 2 /* margins */); 115 /* Return size-hint for this tree-widget-item: */ 116 return QSize(baseSizeHint.width(), iEffectiveHeightHint); 117 } 105 118 default: 106 119 break;
Note:
See TracChangeset
for help on using the changeset viewer.