VirtualBox

Changeset 108202 in vbox


Ignore:
Timestamp:
Feb 13, 2025 4:12:22 PM (3 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
167520
Message:

FE/Qt: bugref:10814: VBox Manager / Tools pane: Pass popup flag deeper into the view.

Location:
trunk/src/VBox/Frontends/VirtualBox/src/manager/tools
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UITools.cpp

    r108201 r108202  
    129129
    130130    /* Prepare view: */
    131     m_pToolsView = new UIToolsView(this);
     131    m_pToolsView = new UIToolsView(this, isPopup());
    132132    if (m_pToolsView)
    133133    {
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.cpp

    r108197 r108202  
    115115
    116116
    117 UIToolsView::UIToolsView(UITools *pParent)
     117UIToolsView::UIToolsView(UITools *pParent, bool fPopup)
    118118    : QIGraphicsView(pParent)
    119119    , m_pTools(pParent)
     120    , m_fPopup(fPopup)
    120121    , m_iMinimumWidthHint(0)
    121122    , m_iMinimumHeightHint(0)
     
    168169
    169170    /* No minimum size-hint for widget mode: */
    170     if (!tools()->isPopup())
     171    if (!isPopup())
    171172        setSizePolicy(QSizePolicy::Ignored, QSizePolicy::Ignored);
    172173
     
    202203    QColor backgroundColorActive = pal.color(QPalette::Active, QPalette::Window);
    203204    QColor backgroundColorInactive = pal.color(QPalette::Inactive, QPalette::Window);
    204     if (!tools()->isPopup())
     205    if (!isPopup())
    205206    {
    206207        backgroundColorActive = uiCommon().isInDarkMode()
     
    216217#else /* !VBOX_WS_MAC */
    217218
    218     if (tools()->isPopup())
     219    if (isPopup())
    219220    {
    220221        /* Same as on macOS for now, will go away soon: */
    221222        QColor backgroundColorActive = pal.color(QPalette::Active, QPalette::Window);
    222223        QColor backgroundColorInactive = pal.color(QPalette::Inactive, QPalette::Window);
    223         if (!tools()->isPopup())
     224        if (!isPopup())
    224225        {
    225226            backgroundColorActive = uiCommon().isInDarkMode()
  • trunk/src/VBox/Frontends/VirtualBox/src/manager/tools/UIToolsView.h

    r108197 r108202  
    5151
    5252    /** Constructs a Tools-view passing @a pParent to the base-class.
    53       * @param  pParent  Brings the Tools-container to embed into. */
    54     UIToolsView(UITools *pParent);
     53      * @param  pParent  Brings the Tools-container to embed into.
     54      * @param  fPopup   Brings whether tools represented as popup. */
     55    UIToolsView(UITools *pParent, bool fPopup);
    5556
    5657    /** @name General stuff.
     
    9899    /** @name General stuff.
    99100      * @{ */
     101        /** Returns whether tools represented as popup. */
     102        bool isPopup() const { return m_fPopup; }
     103
    100104        /** Updates scene rectangle. */
    101105        void updateSceneRect();
     
    111115        /** Holds the Tools-pane reference. */
    112116        UITools *m_pTools;
     117
     118        /** Holds whether tools represented as popup. */
     119        const bool  m_fPopup;
    113120    /** @} */
    114121
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