Changeset 69642 in vbox
- Timestamp:
- Nov 10, 2017 1:06:01 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.cpp
r69500 r69642 52 52 , m_pUpdateTimer(new QTimer(this)) 53 53 , m_pUpdateTimerMenu(0) 54 , m_dRatio((double)QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize) / 16) 54 55 , m_iMargin(0) 55 56 , m_preset(AspectRatioPreset_16x9) … … 66 67 const QIcon full16x9 = UIIconPool::iconSet(":/preview_full_16to9_242x155px.png"); 67 68 const QIcon full4x3 = UIIconPool::iconSet(":/preview_full_4to3_242x192px.png"); 68 m_sizes.insert(AspectRatioPreset_16x10, empty16x10.availableSizes().first());69 m_sizes.insert(AspectRatioPreset_16x9, empty16x9.availableSizes().first());70 m_sizes.insert(AspectRatioPreset_4x3, empty4x3.availableSizes().first());69 m_sizes.insert(AspectRatioPreset_16x10, QSize(242 * m_dRatio, 167 * m_dRatio)); 70 m_sizes.insert(AspectRatioPreset_16x9, QSize(242 * m_dRatio, 155 * m_dRatio)); 71 m_sizes.insert(AspectRatioPreset_4x3, QSize(242 * m_dRatio, 192 * m_dRatio)); 71 72 m_ratios.insert(AspectRatioPreset_16x10, (double)16/10); 72 73 m_ratios.insert(AspectRatioPreset_16x9, (double)16/9); … … 467 468 /* Contents rectangle: */ 468 469 QRect cr = contentsRect().toRect(); 469 m_vRect = cr.adjusted(21 + m_iMargin, 21 + m_iMargin, -21 - m_iMargin, -21 - m_iMargin); 470 m_vRect = cr.adjusted( 21 * m_dRatio + m_iMargin, 21 * m_dRatio + m_iMargin, 471 -21 * m_dRatio - m_iMargin, -21 * m_dRatio - m_iMargin); 470 472 } 471 473 -
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGMachinePreview.h
r69500 r69642 113 113 QMenu *m_pUpdateTimerMenu; 114 114 QHash<PreviewUpdateIntervalType, QAction*> m_actions; 115 const double m_dRatio; 115 116 const int m_iMargin; 116 117 QRect m_vRect;
Note:
See TracChangeset
for help on using the changeset viewer.