Changeset 69821 in vbox
- Timestamp:
- Nov 24, 2017 12:01:19 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 17 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/UITakeSnapshotDialog.cpp
r67535 r69821 25 25 # include <QLineEdit> 26 26 # include <QPushButton> 27 # include <QStyle> 27 28 28 29 /* GUI includes: */ … … 100 101 AssertPtrReturnVoid(pLayout); 101 102 { 102 /* Configure layout: */103 pLayout->setSpacing(20);104 105 103 /* Create sub-layout: */ 106 104 QVBoxLayout *pSubLayout1 = new QVBoxLayout; … … 130 128 { 131 129 /* Configure layout: */ 132 pSubLayout2->setSpacing(10); 130 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 131 pSubLayout2->setSpacing(iS); 133 132 134 133 /* Create name label: */ … … 162 161 { 163 162 /* Configure layout: */ 164 pSubLayout3->setSpacing(10); 163 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 164 pSubLayout3->setSpacing(iS); 165 165 166 166 /* Create description label: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp
r69500 r69821 236 236 /* Configure main-layout: */ 237 237 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 238 m_pMainLayout->setSpacing(3); 238 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 239 m_pMainLayout->setSpacing(iS); 239 240 /* Create button-layout: */ 240 241 QHBoxLayout *pButtonLayout = new QHBoxLayout; -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp
r69726 r69821 181 181 /* Configure top-layout: */ 182 182 pTopLayout->setContentsMargins(0, 0, 0, 0); 183 pTopLayout->setSpacing(10);184 183 /* Create icon-label: */ 185 184 m_pLabelIcon = new QLabel; -
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp
r69672 r69821 815 815 layout()->setSpacing(10); 816 816 #else 817 layout()->setSpacing(4); 817 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 818 layout()->setSpacing(iS); 818 819 #endif 819 820 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r69672 r69821 1522 1522 layout()->setSpacing(10); 1523 1523 #else 1524 layout()->setSpacing(4); 1524 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 1525 layout()->setSpacing(iS); 1525 1526 #endif 1526 1527 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r68885 r69821 1286 1286 /* Configure main-layout: */ 1287 1287 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 1288 m_pMainLayout->setSpacing(5); 1288 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2; 1289 m_pMainLayout->setSpacing(iS); 1289 1290 /* Update pool: */ 1290 1291 updatePool(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp
r69702 r69821 545 545 /* Configure button-layout: */ 546 546 m_pButtonLayout->setContentsMargins(0, 0, 0, 0); 547 m_pButtonLayout->setSpacing(5); 547 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2; 548 m_pButtonLayout->setSpacing(iS); 548 549 /* Add button-layout into main-layout: */ 549 550 m_pMainLayout->addLayout(m_pButtonLayout); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
r69698 r69821 190 190 } 191 191 /* Configure layout: */ 192 pTopLeftLayout->setSpacing(0);193 192 pTopLeftLayout->setContentsMargins(0, 0, 0, 0); 194 193 pTopLeftLayout->addWidget(m_pIcon); … … 198 197 QVBoxLayout *pTopRightLayout = new QVBoxLayout; 199 198 { 199 /* Configure layout: */ 200 // WORKAROUND: 201 // Why do we need it? It should be the default one, but it's not.. 202 const int iS1 = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing); 203 pTopRightLayout->setSpacing(iS1); 204 200 205 /* Prepare 'text' label: */ 201 206 m_pLabel = new QLabel(this); … … 203 208 QGridLayout *pChoiceLayout = new QGridLayout; 204 209 { 210 /* Configure layout: */ 211 // WORKAROUND: 212 // Why do we need it? It should be the default one, but it's not.. 213 const int iS2 = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing); 214 pChoiceLayout->setSpacing(iS2); 215 205 216 /* Prepare icon metric: */ 206 217 const int iIconMetric = QApplication::style()->pixelMetric(QStyle::PM_SmallIconSize); … … 270 281 #ifdef VBOX_WS_MAC 271 282 pChoiceLayout->setSpacing(15); 272 #else /* VBOX_WS_MAC */ 273 pChoiceLayout->setSpacing(6); 274 #endif /* !VBOX_WS_MAC */ 283 #endif 275 284 pChoiceLayout->setContentsMargins(0, 0, 0, 0); 276 285 pChoiceLayout->addWidget(m_pDetachIcon, 0, 0); … … 287 296 #ifdef VBOX_WS_MAC 288 297 pTopRightLayout->setSpacing(15); 289 #else /* VBOX_WS_MAC */ 290 pTopRightLayout->setSpacing(6); 291 #endif /* !VBOX_WS_MAC */ 298 #endif 292 299 pTopRightLayout->setContentsMargins(0, 0, 0, 0); 293 300 pTopRightLayout->addWidget(m_pLabel); … … 295 302 } 296 303 /* Configure layout: */ 297 pTopLayout->setSpacing(20);298 304 pTopLayout->setContentsMargins(0, 0, 0, 0); 305 // WORKAROUND: 306 // Why do we need it? It should be the default one, but it's not.. 307 const int iS3 = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing); 308 pTopLayout->setSpacing(iS3); 299 309 pTopLayout->addItem(pTopLeftLayout); 300 310 pTopLayout->addItem(pTopRightLayout); … … 310 320 } 311 321 /* Configure layout: */ 312 pMainLayout->setSpacing(20);313 322 #ifdef VBOX_WS_MAC 314 323 pMainLayout->setContentsMargins(40, 20, 40, 20); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp
r69260 r69821 1242 1242 layout()->setSpacing(10); 1243 1243 #else 1244 layout()->setSpacing(4); 1244 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 1245 layout()->setSpacing(iS); 1245 1246 #endif 1246 1247 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/UISettingsDialog.cpp
r69500 r69821 103 103 pMainLayout->addWidget(m_pSelector->widget(), 0, 0, 2, 1); 104 104 m_pSelector->widget()->setFocus(); 105 pMainLayout->setSpacing(10);106 105 #endif /* VBOX_GUI_WITH_TOOLBAR_SETTINGS */ 107 106 connect(m_pSelector, SIGNAL(sigCategoryChanged(int)), this, SLOT(sltCategoryChanged(int))); -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r69500 r69821 3450 3450 mLtStorage->setContentsMargins(3, 0, 3, 0); 3451 3451 mLtStorage->setSpacing(3); 3452 #else 3453 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 3; 3454 mLtStorage->setSpacing(iS); 3452 3455 #endif 3453 3456 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r68435 r69821 755 755 m_pLayoutBootOrder->setContentsMargins(3, 3, 3, 3); 756 756 m_pLayoutBootOrder->setSpacing(3); 757 #else 758 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 3; 759 m_pLayoutBootOrder->setSpacing(iS); 757 760 #endif 758 761 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.cpp
r69726 r69821 25 25 # include <QScrollArea> 26 26 # include <QScrollBar> 27 # include <QStyle> 27 28 # include <QCheckBox> 28 29 # include <QPainter> … … 68 69 /* Configure viewport layout: */ 69 70 pWidgetLayout->setMargin(0); 70 pWidgetLayout->setSpacing(4); 71 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2; 72 pWidgetLayout->setSpacing(iS); 71 73 /* Create new widgets according passed vector: */ 72 74 for (int iScreenIndex = 0; iScreenIndex < value.size(); ++iScreenIndex) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
r69500 r69821 481 481 { 482 482 /* Configure layout: */ 483 pLayout->setSpacing(4); 483 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 484 pLayout->setSpacing(iS); 484 485 pLayout->setContentsMargins(0, 0, 0, 0); 485 486 /* Create UIHostComboEditorPrivate instance: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
r69500 r69821 25 25 # include <QLineEdit> 26 26 # include <QKeyEvent> 27 # include <QStyle> 27 28 28 29 /* GUI includes; */ … … 123 124 124 125 /* Configure layout: */ 125 m_pMainLayout->setSpacing(4); 126 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 127 m_pMainLayout->setSpacing(iS); 126 128 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 127 129 m_pMainLayout->addWidget(m_pLineEdit); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
r69676 r69821 826 826 /* On macOS we can do a bit of smoothness: */ 827 827 pMainLayout->setContentsMargins(0, 0, 0, 0); 828 pMainLayout->setSpacing(3); 829 #else 830 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 3; 831 pMainLayout->setSpacing(iS); 828 832 #endif 829 pMainLayout->setSpacing(3);830 833 /* Create table: */ 831 834 m_pTableView = new UIPortForwardingView; -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIWarningPane.cpp
r69500 r69821 107 107 /* Configure layout: */ 108 108 pMainLayout->setContentsMargins(0, 0, 0, 0); 109 pMainLayout->setSpacing(10);110 109 /* Add left stretch: */ 111 110 pMainLayout->addStretch(); … … 121 120 /* Configure layout: */ 122 121 m_pIconLayout->setContentsMargins(0, 0, 0, 0); 123 m_pIconLayout->setSpacing(6);124 122 /* Add into main-layout: */ 125 123 pMainLayout->addLayout(m_pIconLayout);
Note:
See TracChangeset
for help on using the changeset viewer.