QWidget windows have fullscreen button by default; manual test for it
It's again possible for QWindows and widget windows to go into fullscreen mode on the Mac. Change-Id: I7b304a135838394ef0392f89be4f225f2949fad3 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com> Reviewed-by: Lars Knoll <lars.knoll@digia.com> Reviewed-by: Samuel Rødal <samuel.rodal@digia.com>
This commit is contained in:
parent
134f5e0cce
commit
c8dc41bacd
@ -384,6 +384,9 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef QT_COCOA_ENABLE_WINDOW_DEBUG
|
||||
qDebug("windowStyleMask of '%s': flags %X -> styleMask %lX", qPrintable(window()->title()), (int)flags, styleMask);
|
||||
#endif
|
||||
return styleMask;
|
||||
}
|
||||
|
||||
|
@ -1080,8 +1080,8 @@ void QWidgetPrivate::adjustFlags(Qt::WindowFlags &flags, QWidget *w)
|
||||
else if (type == Qt::Tool)
|
||||
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint;
|
||||
else
|
||||
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint;
|
||||
|
||||
flags |= Qt::WindowTitleHint | Qt::WindowSystemMenuHint | Qt::WindowMinimizeButtonHint |
|
||||
Qt::WindowMaximizeButtonHint | Qt::WindowCloseButtonHint | Qt::WindowFullscreenButtonHint;
|
||||
|
||||
}
|
||||
|
||||
|
@ -2092,6 +2092,7 @@ void QMdiSubWindowPrivate::setWindowFlags(Qt::WindowFlags windowFlags)
|
||||
windowFlags = Qt::FramelessWindowHint;
|
||||
|
||||
windowFlags &= ~windowType;
|
||||
windowFlags &= ~Qt::WindowFullscreenButtonHint;
|
||||
windowFlags |= Qt::SubWindow;
|
||||
|
||||
#ifndef QT_NO_ACTION
|
||||
|
@ -59,6 +59,7 @@ HintControl::HintControl(QWidget *parent)
|
||||
, windowSystemMenuCheckBox(new QCheckBox(tr("Window system menu")))
|
||||
, windowMinimizeButtonCheckBox(new QCheckBox(tr("Window minimize button")))
|
||||
, windowMaximizeButtonCheckBox(new QCheckBox(tr("Window maximize button")))
|
||||
, windowFullscreenButtonCheckBox(new QCheckBox(tr("Window fullscreen button")))
|
||||
, windowCloseButtonCheckBox(new QCheckBox(tr("Window close button")))
|
||||
, windowContextHelpButtonCheckBox(new QCheckBox(tr("Window context help button")))
|
||||
, windowShadeButtonCheckBox(new QCheckBox(tr("Window shade button")))
|
||||
@ -74,6 +75,7 @@ HintControl::HintControl(QWidget *parent)
|
||||
connect(windowSystemMenuCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
|
||||
connect(windowMinimizeButtonCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
|
||||
connect(windowMaximizeButtonCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
|
||||
connect(windowFullscreenButtonCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
|
||||
connect(windowCloseButtonCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
|
||||
connect(windowContextHelpButtonCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
|
||||
connect(windowShadeButtonCheckBox, SIGNAL(clicked()), this, SLOT(slotCheckBoxChanged()));
|
||||
@ -91,11 +93,12 @@ HintControl::HintControl(QWidget *parent)
|
||||
layout->addWidget(windowSystemMenuCheckBox, 4, 0);
|
||||
layout->addWidget(windowMinimizeButtonCheckBox, 0, 1);
|
||||
layout->addWidget(windowMaximizeButtonCheckBox, 1, 1);
|
||||
layout->addWidget(windowCloseButtonCheckBox, 2, 1);
|
||||
layout->addWidget(windowContextHelpButtonCheckBox, 3, 1);
|
||||
layout->addWidget(windowShadeButtonCheckBox, 4, 1);
|
||||
layout->addWidget(windowStaysOnTopCheckBox, 5, 1);
|
||||
layout->addWidget(windowStaysOnBottomCheckBox, 6, 1);
|
||||
layout->addWidget(windowFullscreenButtonCheckBox, 2, 1);
|
||||
layout->addWidget(windowCloseButtonCheckBox, 3, 1);
|
||||
layout->addWidget(windowContextHelpButtonCheckBox, 4, 1);
|
||||
layout->addWidget(windowShadeButtonCheckBox, 5, 1);
|
||||
layout->addWidget(windowStaysOnTopCheckBox, 6, 1);
|
||||
layout->addWidget(windowStaysOnBottomCheckBox, 7, 1);
|
||||
layout->addWidget(customizeWindowHintCheckBox, 5, 0);
|
||||
layout->addWidget(transparentForInputCheckBox, 6, 0);
|
||||
#if QT_VERSION < 0x050000
|
||||
@ -120,6 +123,8 @@ Qt::WindowFlags HintControl::hints() const
|
||||
flags |= Qt::WindowMinimizeButtonHint;
|
||||
if (windowMaximizeButtonCheckBox->isChecked())
|
||||
flags |= Qt::WindowMaximizeButtonHint;
|
||||
if (windowFullscreenButtonCheckBox->isChecked())
|
||||
flags |= Qt::WindowFullscreenButtonHint;
|
||||
if (windowCloseButtonCheckBox->isChecked())
|
||||
flags |= Qt::WindowCloseButtonHint;
|
||||
if (windowContextHelpButtonCheckBox->isChecked())
|
||||
@ -148,6 +153,7 @@ void HintControl::setHints(Qt::WindowFlags flags)
|
||||
windowSystemMenuCheckBox->setChecked(flags & Qt::WindowSystemMenuHint);
|
||||
windowMinimizeButtonCheckBox->setChecked(flags & Qt::WindowMinimizeButtonHint);
|
||||
windowMaximizeButtonCheckBox->setChecked(flags & Qt::WindowMaximizeButtonHint);
|
||||
windowFullscreenButtonCheckBox->setChecked(flags & Qt::WindowFullscreenButtonHint);
|
||||
windowCloseButtonCheckBox->setChecked(flags & Qt::WindowCloseButtonHint);
|
||||
windowContextHelpButtonCheckBox->setChecked(flags & Qt::WindowContextHelpButtonHint);
|
||||
windowShadeButtonCheckBox->setChecked(flags & Qt::WindowShadeButtonHint);
|
||||
|
@ -76,6 +76,7 @@ private:
|
||||
QCheckBox *windowSystemMenuCheckBox;
|
||||
QCheckBox *windowMinimizeButtonCheckBox;
|
||||
QCheckBox *windowMaximizeButtonCheckBox;
|
||||
QCheckBox *windowFullscreenButtonCheckBox;
|
||||
QCheckBox *windowCloseButtonCheckBox;
|
||||
QCheckBox *windowContextHelpButtonCheckBox;
|
||||
QCheckBox *windowShadeButtonCheckBox;
|
||||
|
@ -456,7 +456,7 @@ ControllerWidget::ControllerWidget(QWidget *parent)
|
||||
x += 300;
|
||||
m_testWindow->setWindowFlags(Qt::Window | Qt::WindowSystemMenuHint | Qt::WindowCloseButtonHint
|
||||
| Qt::WindowMinimizeButtonHint | Qt::WindowMaximizeButtonHint
|
||||
| Qt::WindowTitleHint);
|
||||
| Qt::WindowTitleHint | Qt::WindowFullscreenButtonHint);
|
||||
m_testWindow->setFramePosition(QPoint(x, y));
|
||||
m_testWindow->resize(200, 200);
|
||||
if (args.contains(QLatin1String("-windowminimized"), Qt::CaseInsensitive))
|
||||
|
Loading…
Reference in New Issue
Block a user