VirtualBox

Ignore:
Timestamp:
Jul 17, 2024 9:28:45 PM (9 months ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
164045
Message:

FE/Qt: bugref:10724: VBoxAboutDlg: Make sure dialog is centered according to screen on macOS and according to parent-widget on other platforms.

File:
1 edited

Legend:

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

    r105391 r105392  
    3737#include "QIDialogButtonBox.h"
    3838#include "UIIconPool.h"
     39#include "UIDesktopWidgetWatchdog.h"
    3940#include "UITranslationEventListener.h"
    4041#include "UIVersion.h"
    4142#include "VBoxAboutDlg.h"
    42 #ifdef VBOX_WS_MAC
    43 # include "UIDesktopWidgetWatchdog.h"
    44 #endif
    4543
    4644/* Other VBox includes: */
     
    8280        m_fPolished = true;
    8381        setFixedSize(m_size);
     82
     83        QRect geo = geometry();
    8484#ifdef VBOX_WS_MAC
    85         /* Center according to parent's screen: */
    86         QRect geo = geometry();
     85        /* Center according to parent screen: */
    8786        geo.moveCenter(gpDesktop->screenGeometry(m_pPseudoParent).center());
     87#else
     88        /* Center according to parent widget: */
     89        geo.moveCenter(parentWidget()->geometry().center());
     90#endif
    8891        setGeometry(geo);
    89 #endif
    9092    }
    9193}
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