VirtualBox

Changeset 100698 in vbox


Ignore:
Timestamp:
Jul 25, 2023 1:37:07 PM (16 months ago)
Author:
vboxsync
Message:

FE/Qt: bugref:9979: VBox Manager / Chooser pane: Make sure Hamburger Menu is always shown within available geometry bounds.

File:
1 edited

Legend:

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

    r99946 r100698  
    3737#include "QISplitter.h"
    3838#include "UIActionPoolManager.h"
     39#include "UIDesktopWidgetWatchdog.h"
    3940#include "UIExtraDataManager.h"
    4041#include "UIChooser.h"
     
    532533    m_pPaneTools->setToolsClass(enmClass);
    533534
     535    /* Compose popup-menu geometry first of all: */
     536    QRect ourGeo = QRect(position, m_pPaneTools->minimumSizeHint());
     537    /* Adjust location only to properly fit into available geometry space: */
     538    const QRect availableGeo = gpDesktop->availableGeometry(position);
     539    ourGeo = gpDesktop->normalizeGeometry(ourGeo, availableGeo, false /* resize? */);
     540
    534541    /* Move, resize and show: */
    535     m_pPaneTools->move(position);
     542    m_pPaneTools->move(ourGeo.topLeft());
    536543    m_pPaneTools->show();
    537544    // WORKAROUND:
    538545    // Don't want even to think why, but for Qt::Popup resize to
    539546    // smaller size often being ignored until it is actually shown.
    540     m_pPaneTools->resize(m_pPaneTools->minimumSizeHint());
     547    m_pPaneTools->resize(ourGeo.size());
    541548}
    542549
Note: See TracChangeset for help on using the changeset viewer.

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