Changeset 7623 in vbox
- Timestamp:
- Mar 28, 2008 10:41:47 AM (17 years ago)
- svn:sync-xref-src-repo-rev:
- 29124
- Location:
- trunk/src/VBox/Frontends/VirtualBox4
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox4/include/VBoxUtils.h
r7560 r7623 219 219 #endif // __VBoxUtils_h__ 220 220 221 /* Qt 4.2.0 support function */ 222 inline void setLayoutMargin (QLayout *aLayout, int aMargin) 223 { 224 #if QT_VERSION < 0x040200 225 /* Deprecated since > 4.2 */ 226 aLayout->setMargin (aMargin); 227 #else 228 /* New since > 4.2 */ 229 aLayout->setContentsMargins (aMargin, aMargin, aMargin, aMargin); 230 #endif 231 } 232 -
trunk/src/VBox/Frontends/VirtualBox4/src/QIMessageBox.cpp
r7369 r7623 20 20 #include "VBoxDefs.h" 21 21 #include "QIRichLabel.h" 22 #include "VBoxUtils.h" 22 23 23 24 /* Qt includes */ … … 54 55 55 56 QVBoxLayout *layout = new QVBoxLayout (this); 56 layout->setMargin (11);57 setLayoutMargin (layout, 11); 57 58 layout->setSpacing (10); 58 59 layout->setSizeConstraint (QLayout::SetMinimumSize); … … 61 62 62 63 QHBoxLayout *hLayout = new QHBoxLayout (main); 63 hLayout->setContentsMargins (0, 0, 0, 0);64 setLayoutMargin (hLayout, 0); 64 65 hLayout->setSpacing (10); 65 66 layout->addWidget (main); … … 75 76 76 77 QVBoxLayout* messageVBoxLayout = new QVBoxLayout(); 77 messageVBoxLayout->setContentsMargins (0, 0, 0, 0);78 setLayoutMargin (messageVBoxLayout, 0); 78 79 messageVBoxLayout->setSpacing (10); 79 80 hLayout->addLayout (messageVBoxLayout); … … 95 96 96 97 QVBoxLayout* detailsVBoxLayout = new QVBoxLayout(mDetailsVBox); 97 detailsVBoxLayout->setContentsMargins (0, 0, 0, 0);98 setLayoutMargin (detailsVBoxLayout, 0); 98 99 detailsVBoxLayout->setSpacing (10); 99 100 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxConsoleWnd.cpp
r7599 r7623 29 29 #include "QIStatusBar.h" 30 30 #include "QIHotKeyEdit.h" 31 #include "VBoxUtils.h" 31 32 32 33 /* Qt includes */ … … 396 397 QWidget *indicatorBox = new QWidget (); 397 398 QHBoxLayout *indicatorBoxHLayout = new QHBoxLayout (indicatorBox); 398 indicatorBoxHLayout->setContentsMargins (0, 0, 0, 0);399 setLayoutMargin (indicatorBoxHLayout, 0); 399 400 indicatorBoxHLayout->setSpacing (5); 400 401 /* i/o devices */ … … 464 465 hostkey_hbox = new QWidget(); 465 466 QHBoxLayout *hostkeyHBoxLayout = new QHBoxLayout (hostkey_hbox); 466 hostkeyHBoxLayout->setContentsMargins (0, 0, 0, 0);467 setLayoutMargin (hostkeyHBoxLayout, 0); 467 468 hostkeyHBoxLayout->setSpacing (3); 468 469 indicatorBoxHLayout->addWidget (hostkey_hbox); … … 651 652 setCentralWidget (new QWidget (this)); 652 653 QGridLayout *pMainLayout = new QGridLayout(centralWidget()); 653 pMainLayout->setContentsMargins (0, 0, 0, 0);654 setLayoutMargin (pMainLayout, 0); 654 655 pMainLayout->setSpacing (0); 655 656 … … 3445 3446 /* Setup main dialog's layout */ 3446 3447 QVBoxLayout *mainLayout = new QVBoxLayout (this); 3447 mainLayout->setContentsMargins (10, 10, 10, 10);3448 setLayoutMargin (mainLayout, 10); 3448 3449 mainLayout->setSpacing (10); 3449 3450 -
trunk/src/VBox/Frontends/VirtualBox4/src/VBoxSelectorWnd.cpp
r7611 r7623 29 29 #include "VBoxGlobalSettingsDlg.h" 30 30 #include "VBoxVMLogViewer.h" 31 #include "VBoxUtils.h" 31 32 32 33 #ifdef Q_WS_X11 … … 245 246 QVBoxLayout *vMainLayout = new QVBoxLayout (this); 246 247 vMainLayout->setSpacing (10); 247 vMainLayout->setContentsMargins (0, 0, 0, 0);248 setLayoutMargin (vMainLayout, 0); 248 249 249 250 /* mBrowser */ … … 453 454 new QHBoxLayout (centralWidget()); 454 455 centralLayout->setSpacing (9); 455 centralLayout->setContentsMargins (5, 5, 5, 5);456 setLayoutMargin (centralLayout, 5); 456 457 457 458 /* left vertical box */
Note:
See TracChangeset
for help on using the changeset viewer.