Changeset 73527 in vbox for trunk/src/VBox/Frontends
- Timestamp:
- Aug 6, 2018 2:43:38 PM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIVirtualBoxManagerWidget.cpp
r73492 r73527 21 21 22 22 /* Qt includes: */ 23 # include <QHBoxLayout> 23 24 # include <QStyle> 24 25 # include <QVBoxLayout> … … 462 463 void UIVirtualBoxManagerWidget::prepareWidgets() 463 464 { 464 /* Create central-layout: */465 QVBoxLayout *pLayout = new QVBoxLayout(this);466 if (pLayout )465 /* Create main-layout: */ 466 QVBoxLayout *pLayoutMain = new QVBoxLayout(this); 467 if (pLayoutMain) 467 468 { 468 469 /* Configure layout: */ 469 pLayout->setSpacing(0); 470 pLayout->setContentsMargins(0, 0, 0, 0); 471 472 /* Add into layout: */ 473 pLayout->addWidget(m_pToolBar); 474 475 /* Create sliding-widget: */ 476 m_pSlidingWidget = new UISlidingWidget; 477 if (m_pSlidingWidget) 470 pLayoutMain->setSpacing(0); 471 pLayoutMain->setContentsMargins(0, 0, 0, 0); 472 473 /* Create splitter: */ 474 m_pSplitter = new QISplitter; 475 if (m_pSplitter) 478 476 { 479 /* Create splitter: */ 480 m_pSplitter = new QISplitter; 481 if (m_pSplitter) 477 /* Configure splitter: */ 478 #ifdef VBOX_WS_X11 479 m_pSplitter->setHandleType(QISplitter::Native); 480 #endif 481 482 /* Create Chooser-pane: */ 483 m_pPaneChooser = new UIChooser(this); 484 if (m_pPaneChooser) 482 485 { 483 /* Configure splitter: */ 484 #ifdef VBOX_WS_X11 485 m_pSplitter->setHandleType(QISplitter::Native); 486 #endif 487 488 /* Create Chooser-pane: */ 489 m_pPaneChooser = new UIChooser(this); 490 if (m_pPaneChooser) 486 /* Add into splitter: */ 487 m_pSplitter->addWidget(m_pPaneChooser); 488 } 489 490 /* Create right widget: */ 491 QWidget *pWidgetRight = new QWidget; 492 if (pWidgetRight) 493 { 494 /* Create right-layout: */ 495 QVBoxLayout *pLayoutRight = new QVBoxLayout(pWidgetRight); 496 if(pLayoutRight) 491 497 { 492 /* Add into splitter: */ 493 m_pSplitter->addWidget(m_pPaneChooser); 498 /* Configure layout: */ 499 pLayoutRight->setContentsMargins(0, 0, 0, 0); 500 501 /* Add tool-bar into layout: */ 502 pLayoutRight->addWidget(m_pToolBar); 503 504 /* Create sliding-widget: */ 505 m_pSlidingWidget = new UISlidingWidget; 506 if (m_pSlidingWidget) 507 { 508 /* Create Machine Tools-pane: */ 509 m_pPaneToolsMachine = new UIToolPaneMachine(actionPool()); 510 /* Create Global Tools-pane: */ 511 m_pPaneToolsGlobal = new UIToolPaneGlobal(actionPool()); 512 513 /* Add left/right widgets into sliding widget: */ 514 m_pSlidingWidget->setWidgets(m_pPaneToolsMachine, m_pPaneToolsGlobal); 515 516 /* Add into layout: */ 517 pLayoutRight->addWidget(m_pSlidingWidget); 518 } 494 519 } 495 520 496 /* Create Machine Tools-pane: */ 497 m_pPaneToolsMachine = new UIToolPaneMachine(actionPool()); 498 if (m_pPaneToolsMachine) 499 { 500 /* Add into splitter: */ 501 m_pSplitter->addWidget(m_pPaneToolsMachine); 502 } 503 504 /* Adjust splitter colors according to main widgets it splits: */ 505 m_pSplitter->configureColors(m_pPaneChooser->palette().color(QPalette::Active, QPalette::Window), 506 m_pPaneToolsMachine->palette().color(QPalette::Active, QPalette::Window)); 507 /* Set the initial distribution. The right site is bigger. */ 508 m_pSplitter->setStretchFactor(0, 2); 509 m_pSplitter->setStretchFactor(1, 3); 521 /* Add into splitter: */ 522 m_pSplitter->addWidget(pWidgetRight); 510 523 } 511 524 512 /* Create Global Tools-pane: */513 m_p PaneToolsGlobal = new UIToolPaneGlobal(actionPool());514 if (m_pPaneToolsGlobal)515 516 /* Add left/right widgets into sliding widget: */517 m_pS lidingWidget->setWidgets(m_pSplitter, m_pPaneToolsGlobal);525 /* Adjust splitter colors according to main widgets it splits: */ 526 m_pSplitter->configureColors(m_pPaneChooser->palette().color(QPalette::Active, QPalette::Window), 527 m_pPaneToolsMachine->palette().color(QPalette::Active, QPalette::Window)); 528 /* Set the initial distribution. The right site is bigger. */ 529 m_pSplitter->setStretchFactor(0, 2); 530 m_pSplitter->setStretchFactor(1, 3); 518 531 519 532 /* Add into layout: */ 520 pLayout ->addWidget(m_pSlidingWidget);533 pLayoutMain->addWidget(m_pSplitter); 521 534 } 522 535 }
Note:
See TracChangeset
for help on using the changeset viewer.