- Timestamp:
- Jan 11, 2018 10:39:18 AM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/runtime/UIVMCloseDialog.cpp
r70523 r70530 174 174 QVBoxLayout *pMainLayout = new QVBoxLayout(this); 175 175 { 176 /* Configure layout: */ 177 #ifdef VBOX_WS_MAC 178 pMainLayout->setContentsMargins(40, 20, 40, 20); 179 pMainLayout->setSpacing(15); 180 #else 181 pMainLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutVerticalSpacing) * 2); 182 #endif 183 176 184 /* Prepare 'top' layout: */ 177 185 QHBoxLayout *pTopLayout = new QHBoxLayout; 178 186 { 187 /* Configure layout: */ 188 #ifdef VBOX_WS_MAC 189 pTopLayout->setSpacing(20); 190 #else 191 pTopLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) * 2); 192 #endif 193 179 194 /* Prepare 'top-left' layout: */ 180 195 QVBoxLayout *pTopLeftLayout = new QVBoxLayout; … … 189 204 m_pIcon->setPixmap(icon.pixmap(iIconMetric, iIconMetric)); 190 205 } 191 /* Configure layout: */ 192 pTopLeftLayout->setContentsMargins(0, 0, 0, 0);206 207 /* Add into layout: */ 193 208 pTopLeftLayout->addWidget(m_pIcon); 194 209 pTopLeftLayout->addStretch(); … … 198 213 { 199 214 /* Configure layout: */ 200 // WORKAROUND:201 // Why do we need it? It should be the default one, but it's not..202 215 #ifdef VBOX_WS_MAC 203 216 pTopRightLayout->setSpacing(10); … … 212 225 { 213 226 /* Configure layout: */ 214 // WORKAROUND:215 // Why do we need it? It should be the default one, but it's not..216 227 #ifdef VBOX_WS_MAC 217 228 pChoiceLayout->setSpacing(10); … … 284 295 /* Prepare 'discard' check-box: */ 285 296 m_pDiscardCheckBox = new QCheckBox(this); 286 /* Configure layout: */ 287 pChoiceLayout->setContentsMargins(0, 0, 0, 0);297 298 /* Add into layout: */ 288 299 pChoiceLayout->addWidget(m_pDetachIcon, 0, 0); 289 300 pChoiceLayout->addWidget(m_pDetachRadio, 0, 1); … … 296 307 pChoiceLayout->addWidget(m_pDiscardCheckBox, 4, 1); 297 308 } 298 /* Configure layout: */ 299 pTopRightLayout->setContentsMargins(0, 0, 0, 0);309 310 /* Add into layout: */ 300 311 pTopRightLayout->addWidget(m_pLabel); 301 312 pTopRightLayout->addItem(pChoiceLayout); 302 313 } 303 /* Configure layout: */ 304 pTopLayout->setContentsMargins(0, 0, 0, 0); 305 #ifdef VBOX_WS_MAC 306 pTopLayout->setSpacing(20); 307 #else 308 pTopLayout->setSpacing(qApp->style()->pixelMetric(QStyle::PM_LayoutHorizontalSpacing) * 2); 309 #endif 314 315 /* Add into layout: */ 310 316 pTopLayout->addItem(pTopLeftLayout); 311 317 pTopLayout->addItem(pTopRightLayout); 312 318 } 319 313 320 /* Prepare button-box: */ 314 321 QIDialogButtonBox *pButtonBox = new QIDialogButtonBox(this); … … 320 327 connect(pButtonBox, SIGNAL(helpRequested()), &msgCenter(), SLOT(sltShowHelpHelpDialog())); 321 328 } 322 /* Configure layout: */ 323 #ifdef VBOX_WS_MAC 324 pMainLayout->setContentsMargins(40, 20, 40, 20); 325 #endif /* VBOX_WS_MAC */ 329 330 /* Add into layout: */ 326 331 pMainLayout->addItem(pTopLayout); 327 332 pMainLayout->addWidget(pButtonBox);
Note:
See TracChangeset
for help on using the changeset viewer.