Changeset 74680 in vbox for trunk/src/VBox/Frontends/VirtualBox
- Timestamp:
- Oct 8, 2018 1:01:03 PM (6 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager/details
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsModel.cpp
r74677 r74680 96 96 { 97 97 /* Prepare variables: */ 98 const int iSceneMargin = data(DetailsModelData_Margin).toInt();99 98 const QSize viewportSize = paintDevice()->viewport()->size(); 100 const int iViewportWidth = viewportSize.width() - 2 * iSceneMargin;101 99 102 100 /* Move root: */ 103 m_pRoot->setPos( iSceneMargin, iSceneMargin);101 m_pRoot->setPos(0, 0); 104 102 /* Resize root: */ 105 m_pRoot->resize( iViewportWidth, m_pRoot->minimumHeightHint());103 m_pRoot->resize(viewportSize.width(), m_pRoot->minimumHeightHint()); 106 104 /* Layout root content: */ 107 105 m_pRoot->updateLayout(); … … 212 210 } 213 211 214 QVariant UIDetailsModel::data(int iKey) const215 {216 switch (iKey)217 {218 case DetailsModelData_Margin: return 0;219 default: break;220 }221 return QVariant();222 }223 224 212 void UIDetailsModel::prepareScene() 225 213 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/details/UIDetailsModel.h
r74677 r74680 103 103 private: 104 104 105 /* Data enumerator: */106 enum DetailsModelData107 {108 /* Layout hints: */109 DetailsModelData_Margin110 };111 112 /* Data provider: */113 QVariant data(int iKey) const;114 115 105 /* Helpers: Prepare stuff: */ 116 106 void prepareScene();
Note:
See TracChangeset
for help on using the changeset viewer.