Changeset 108966 in vbox
- Timestamp:
- Apr 14, 2025 5:37:43 PM (6 days ago)
- svn:sync-xref-src-repo-rev:
- 168486
- Location:
- trunk/src/VBox/Frontends/VirtualBox/src/manager
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Frontends/VirtualBox/src/manager/UIGlobalToolsWidget.cpp
r108691 r108966 348 348 349 349 /* Create tool-menu: */ 350 m_pMenu = new UITools(this, actionPool());350 m_pMenu = new UITools(this, UIToolClass_Global, actionPool()); 351 351 if (toolMenu()) 352 352 { -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp
r108691 r108966 39 39 40 40 UITools::UITools(QWidget *pParent, 41 UIToolClass enmClass, 41 42 UIActionPool *pActionPool) 42 43 : QWidget(pParent, Qt::Widget) 44 , m_enmClass(enmClass) 43 45 , m_pActionPool(pActionPool) 46 , m_enmAlignment(m_enmClass == UIToolClass_Machine ? Qt::Horizontal : Qt::Vertical) 44 47 , m_pMainLayout(0) 45 48 , m_pToolsModel(0) … … 97 100 { 98 101 /* Setup own layout rules: */ 99 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding); 102 switch (m_enmAlignment) 103 { 104 case Qt::Vertical: 105 setSizePolicy(QSizePolicy::Fixed, QSizePolicy::MinimumExpanding); 106 break; 107 case Qt::Horizontal: 108 setSizePolicy(QSizePolicy::MinimumExpanding, QSizePolicy::Fixed); 109 break; 110 } 100 111 101 112 /* Prepare main-layout: */ -
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.h
r108691 r108966 61 61 62 62 /** Constructs Tools-pane passing @a pParent to the base-class. 63 * @param enmClass Brings the tool class. 63 64 * @param pActionPool Brings the action-pool reference. */ 64 65 UITools(QWidget *pParent, 66 UIToolClass enmClass, 65 67 UIActionPool *pActionPool); 66 68 /** Destructs Tools-pane. */ … … 114 116 /** @name General stuff. 115 117 * @{ */ 118 /** Holds the tool class. */ 119 UIToolClass m_enmClass; 120 116 121 /** Holds the action-pool reference. */ 117 122 UIActionPool *m_pActionPool; 123 124 /** Holds the layout alignment. */ 125 Qt::Alignment m_enmAlignment; 118 126 119 127 /** Holds the main layout instance. */
Note:
See TracChangeset
for help on using the changeset viewer.