VirtualBox

Changeset 31319 in vbox


Ignore:
Timestamp:
Aug 2, 2010 4:41:47 PM (14 years ago)
Author:
vboxsync
Message:

FE/Qt4-OSX: use sheet windows in scale mode

Location:
trunk/src/VBox/Frontends/VirtualBox/src
Files:
5 edited

Legend:

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

    r29794 r31319  
    2525#include "UIMachineWindowNormal.h"
    2626
     27#ifdef Q_WS_MAC
     28# include "VBoxGlobal.h"
     29#endif /* Q_WS_MAC */
     30
    2731/* Qt includes */
    2832#include <QPushButton>
     
    3539    /* No sheets in another mode than normal for now. Firstly it looks ugly and
    3640     * secondly in some cases it is broken. */
    37     UIMachineWindowNormal *pWnd = qobject_cast<UIMachineWindowNormal*>(aParent);
    38     if (pWnd)
     41    if (vboxGlobal().isSheetWindowsAllowed(aParent))
    3942        setWindowFlags (Qt::Sheet);
    4043#endif /* Q_WS_MAC */
  • trunk/src/VBox/Frontends/VirtualBox/src/VBoxTakeSnapshotDlg.cpp

    r29794 r31319  
    4141    /* No sheets in another mode than normal for now. Firstly it looks ugly and
    4242     * secondly in some cases it is broken. */
    43     if (   qobject_cast<UIMachineWindowNormal*>(pParent)
     43    if (   vboxGlobal().isSheetWindowsAllowed(pParent)
    4444        || qobject_cast<VBoxSnapshotsWgt*>(pParent))
    45         setWindowFlags (Qt::Sheet);
     45        setWindowFlags(Qt::Sheet);
    4646#endif /* Q_WS_MAC */
    4747
  • trunk/src/VBox/Frontends/VirtualBox/src/extensions/QIMessageBox.cpp

    r30192 r31319  
    6666    /* No sheets in another mode than normal for now. Firstly it looks ugly and
    6767     * secondly in some cases it is broken. */
    68     if (!(   qobject_cast<UIMachineWindowFullscreen*>(aParent)
    69           || qobject_cast<UIMachineWindowSeamless*>(aParent)))
    70         setWindowFlags (Qt::Sheet);
     68    if (vboxGlobal().isSheetWindowsAllowed(aParent))
     69        setWindowFlags(Qt::Sheet);
    7170#endif /* Q_WS_MAC */
    7271
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.cpp

    r31019 r31319  
    4040# include "VBoxFBOverlay.h"
    4141#endif /* VBOX_WITH_VIDEOHWACCEL */
     42
     43#ifdef Q_WS_MAC
     44# include "UIMachineWindowFullscreen.h"
     45# include "UIMachineWindowSeamless.h"
     46#endif /* Q_WS_MAC */
    4247
    4348/* Qt includes */
     
    41284133
    41294134#endif
     4135
     4136#ifdef Q_WS_MAC
     4137bool VBoxGlobal::isSheetWindowsAllowed(QWidget *pParent) const
     4138{
     4139    if (!(   qobject_cast<UIMachineWindowFullscreen*>(pParent)
     4140          || qobject_cast<UIMachineWindowSeamless*>(pParent)))
     4141        return true;
     4142}
     4143#endif /* Q_WS_MAC */
    41304144
    41314145// Public slots
  • trunk/src/VBox/Frontends/VirtualBox/src/globals/VBoxGlobal.h

    r31008 r31319  
    639639#endif
    640640
     641#ifdef Q_WS_MAC
     642    bool isSheetWindowsAllowed(QWidget *pParent) const;
     643#endif /* Q_WS_MAC */
     644
    641645signals:
    642646
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