Changeset 60538 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Apr 18, 2016 1:23:14 PM (9 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/selector/graphics/details/UIGDetailsElements.cpp
r60362 r60538 128 128 setIcon(gpConverter->toIcon(elementType())); 129 129 130 /* Create layout: */ 131 QGraphicsLinearLayout *pLayout = new QGraphicsLinearLayout; 132 AssertPtr(pLayout); 133 { 134 /* Prepare layout: */ 130 /* Create preview: */ 131 m_pPreview = new UIGMachinePreview(this); 132 AssertPtr(m_pPreview); 133 { 134 /* Configure preview: */ 135 connect(m_pPreview, SIGNAL(sigSizeHintChanged()), 136 this, SLOT(sltPreviewSizeHintChanged())); 135 137 const int iMargin = data(ElementData_Margin).toInt(); 136 pLayout->setContentsMargins(iMargin, 2 * iMargin + minimumHeaderHeight(), iMargin, iMargin); 137 /* Assign layout to widget: */ 138 setLayout(pLayout); 139 /* Create preview: */ 140 m_pPreview = new UIGMachinePreview(this); 141 AssertPtr(m_pPreview); 142 { 143 /* Prepare preview: */ 144 connect(m_pPreview, SIGNAL(sigSizeHintChanged()), 145 this, SLOT(sltPreviewSizeHintChanged())); 146 /* Add preview into layout: */ 147 pLayout->addItem(m_pPreview); 148 } 149 } 150 151 /* Set fixed size policy finally (after all content constructed): */ 152 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::Fixed); 138 m_pPreview->setPos(iMargin, 2 * iMargin + minimumHeaderHeight()); 139 m_pPreview->resize(m_pPreview->minimumSizeHint()); 140 } 153 141 154 142 /* Translate finally: */ … … 238 226 /* Set new machine attribute directly: */ 239 227 m_pPreview->setMachine(machine()); 228 m_pPreview->resize(m_pPreview->minimumSizeHint()); 240 229 emit sigBuildDone(); 241 230 }
Note:
See TracChangeset
for help on using the changeset viewer.