Changeset 70523 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Jan 10, 2018 5:22:30 PM (7 years ago)
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src
- Files:
-
- 15 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/UITakeSnapshotDialog.cpp
r69823 r70523 102 102 { 103 103 /* Configure layout: */ 104 const int iS0 = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) * 2; 105 pLayout->setSpacing(iS0); 104 #ifdef VBOX_WS_MAC 105 pLayout->setSpacing(20); 106 pLayout->setContentsMargins(40, 20, 40, 20); 107 #else 108 pLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) * 2); 109 #endif 106 110 107 111 /* Create sub-layout: */ … … 132 136 { 133 137 /* Configure layout: */ 134 const int iS2 = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 135 pSubLayout2->setSpacing(iS2); 138 #ifdef VBOX_WS_MAC 139 pSubLayout2->setSpacing(5); 140 #else 141 pSubLayout2->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 142 #endif 136 143 137 144 /* Create name label: */ … … 165 172 { 166 173 /* Configure layout: */ 167 const int iS3 = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 168 pSubLayout3->setSpacing(iS3); 174 #ifdef VBOX_WS_MAC 175 pSubLayout3->setSpacing(5); 176 #else 177 pSubLayout3->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 178 #endif 169 179 170 180 /* Create description label: */ -
trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIArrowSplitter.cpp
r69821 r70523 236 236 /* Configure main-layout: */ 237 237 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 238 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 239 m_pMainLayout->setSpacing(iS); 238 #ifdef VBOX_WS_MAC 239 m_pMainLayout->setSpacing(5); 240 #else 241 m_pMainLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 242 #endif 240 243 /* Create button-layout: */ 241 244 QHBoxLayout *pButtonLayout = new QHBoxLayout; -
trunk/src/VBox/Frontends/VirtualBox/src/hostnetwork/UIHostNetworkManager.cpp
r69821 r70523 815 815 layout()->setSpacing(10); 816 816 #else 817 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 818 layout()->setSpacing(iS); 817 layout()->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 819 818 #endif 820 819 -
trunk/src/VBox/Frontends/VirtualBox/src/logviewer/UIVMLogViewerWidget.cpp
r70519 r70523 485 485 layout()->setSpacing(10); 486 486 #else 487 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 488 layout()->setSpacing(iS); 487 layout()->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 489 488 #endif 490 489 -
trunk/src/VBox/Frontends/VirtualBox/src/medium/UIMediumManager.cpp
r70487 r70523 1522 1522 layout()->setSpacing(10); 1523 1523 #else 1524 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 1525 layout()->setSpacing(iS); 1524 layout()->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 1526 1525 #endif 1527 1526 -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIIndicatorsPool.cpp
r69821 r70523 1286 1286 /* Configure main-layout: */ 1287 1287 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 1288 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2; 1289 m_pMainLayout->setSpacing(iS); 1288 #ifdef VBOX_WS_MAC 1289 m_pMainLayout->setSpacing(5); 1290 #else 1291 m_pMainLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2); 1292 #endif 1290 1293 /* Update pool: */ 1291 1294 updatePool(); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIStatusBarEditorWindow.cpp
r69821 r70523 545 545 /* Configure button-layout: */ 546 546 m_pButtonLayout->setContentsMargins(0, 0, 0, 0); 547 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2; 548 m_pButtonLayout->setSpacing(iS); 547 #ifdef VBOX_WS_MAC 548 m_pButtonLayout->setSpacing(5); 549 #else 550 m_pButtonLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2); 551 #endif 549 552 /* Add button-layout into main-layout: */ 550 553 m_pMainLayout->addLayout(m_pButtonLayout); -
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
r69823 r70523 200 200 // WORKAROUND: 201 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); 202 #ifdef VBOX_WS_MAC 203 pTopRightLayout->setSpacing(10); 204 #else 205 pTopRightLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing)); 206 #endif 204 207 205 208 /* Prepare 'text' label: */ … … 211 214 // WORKAROUND: 212 215 // 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); 216 #ifdef VBOX_WS_MAC 217 pChoiceLayout->setSpacing(10); 218 #else 219 pChoiceLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing)); 220 #endif 215 221 216 222 /* Prepare icon metric: */ … … 279 285 m_pDiscardCheckBox = new QCheckBox(this); 280 286 /* Configure layout: */ 281 #ifdef VBOX_WS_MAC282 pChoiceLayout->setSpacing(15);283 #endif284 287 pChoiceLayout->setContentsMargins(0, 0, 0, 0); 285 288 pChoiceLayout->addWidget(m_pDetachIcon, 0, 0); … … 294 297 } 295 298 /* Configure layout: */ 296 #ifdef VBOX_WS_MAC297 pTopRightLayout->setSpacing(15);298 #endif299 299 pTopRightLayout->setContentsMargins(0, 0, 0, 0); 300 300 pTopRightLayout->addWidget(m_pLabel); … … 303 303 /* Configure layout: */ 304 304 pTopLayout->setContentsMargins(0, 0, 0, 0); 305 const int iS3 = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) * 2; 306 pTopLayout->setSpacing(iS3); 305 #ifdef VBOX_WS_MAC 306 pTopLayout->setSpacing(20); 307 #else 308 pTopLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) * 2); 309 #endif 307 310 pTopLayout->addItem(pTopLeftLayout); 308 311 pTopLayout->addItem(pTopRightLayout); -
trunk/src/VBox/Frontends/VirtualBox/src/selector/UISnapshotPane.cpp
r69821 r70523 1242 1242 layout()->setSpacing(10); 1243 1243 #else 1244 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 1245 layout()->setSpacing(iS); 1244 layout()->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 1246 1245 #endif 1247 1246 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsStorage.cpp
r69821 r70523 3451 3451 mLtStorage->setSpacing(3); 3452 3452 #else 3453 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 3; 3454 mLtStorage->setSpacing(iS); 3453 mLtStorage->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 3); 3455 3454 #endif 3456 3455 -
trunk/src/VBox/Frontends/VirtualBox/src/settings/machine/UIMachineSettingsSystem.cpp
r69821 r70523 756 756 m_pLayoutBootOrder->setSpacing(3); 757 757 #else 758 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 3; 759 m_pLayoutBootOrder->setSpacing(iS); 758 m_pLayoutBootOrder->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 3); 760 759 #endif 761 760 -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIFilmContainer.cpp
r69821 r70523 69 69 /* Configure viewport layout: */ 70 70 pWidgetLayout->setMargin(0); 71 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2; 72 pWidgetLayout->setSpacing(iS); 71 #ifdef VBOX_WS_MAC 72 pWidgetLayout->setSpacing(5); 73 #else 74 pWidgetLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 2); 75 #endif 73 76 /* Create new widgets according passed vector: */ 74 77 for (int iScreenIndex = 0; iScreenIndex < value.size(); ++iScreenIndex) -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHostComboEditor.cpp
r69821 r70523 481 481 { 482 482 /* Configure layout: */ 483 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 484 pLayout->setSpacing(iS); 483 #ifdef VBOX_WS_MAC 484 pLayout->setSpacing(5); 485 #else 486 pLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 487 #endif 485 488 pLayout->setContentsMargins(0, 0, 0, 0); 486 489 /* Create UIHostComboEditorPrivate instance: */ -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIHotKeyEditor.cpp
r69821 r70523 124 124 125 125 /* Configure layout: */ 126 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2; 127 m_pMainLayout->setSpacing(iS); 126 #ifdef VBOX_WS_MAC 127 m_pMainLayout->setSpacing(5); 128 #else 129 m_pMainLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) / 2); 130 #endif 128 131 m_pMainLayout->setContentsMargins(0, 0, 0, 0); 129 132 m_pMainLayout->addWidget(m_pLineEdit); -
trunk/src/VBox/Frontends/VirtualBox/src/widgets/UIPortForwardingTable.cpp
r69821 r70523 828 828 pMainLayout->setSpacing(3); 829 829 #else 830 const int iS = qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 3; 831 pMainLayout->setSpacing(iS); 830 pMainLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) / 3); 832 831 #endif 833 832 /* Create table: */
Note:
See TracChangeset
for help on using the changeset viewer.