VirtualBox

Changeset 108966 in vbox


Ignore:
Timestamp:
Apr 14, 2025 5:37:43 PM (6 days ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
168486
Message:

FE/Qt: bugref:10814: VBox Manager / Tools pane: Support for horizontal layout; This still have to be passed/handled through the model as well.

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  
    348348
    349349        /* Create tool-menu: */
    350         m_pMenu = new UITools(this, actionPool());
     350        m_pMenu = new UITools(this, UIToolClass_Global, actionPool());
    351351        if (toolMenu())
    352352        {
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp

    r108691 r108966  
    3939
    4040UITools::UITools(QWidget *pParent,
     41                 UIToolClass enmClass,
    4142                 UIActionPool *pActionPool)
    4243    : QWidget(pParent, Qt::Widget)
     44    , m_enmClass(enmClass)
    4345    , m_pActionPool(pActionPool)
     46    , m_enmAlignment(m_enmClass == UIToolClass_Machine ? Qt::Horizontal : Qt::Vertical)
    4447    , m_pMainLayout(0)
    4548    , m_pToolsModel(0)
     
    97100{
    98101    /* 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    }
    100111
    101112    /* Prepare main-layout: */
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.h

    r108691 r108966  
    6161
    6262    /** Constructs Tools-pane passing @a pParent to the base-class.
     63      * @param  enmClass     Brings the tool class.
    6364      * @param  pActionPool  Brings the action-pool reference. */
    6465    UITools(QWidget *pParent,
     66            UIToolClass enmClass,
    6567            UIActionPool *pActionPool);
    6668    /** Destructs Tools-pane. */
     
    114116    /** @name General stuff.
    115117      * @{ */
     118        /** Holds the tool class. */
     119        UIToolClass  m_enmClass;
     120
    116121        /** Holds the action-pool reference. */
    117122        UIActionPool *m_pActionPool;
     123
     124        /** Holds the layout alignment. */
     125        Qt::Alignment  m_enmAlignment;
    118126
    119127        /** Holds the main layout instance. */
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette