summaryrefslogtreecommitdiff
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2010-10-15 13:20:42 +0200
committerFabien Freling <fabien.freling@nokia.com>2010-10-15 13:21:05 +0200
commit5fd505cac71e97cf181c0d05867a77e640814fc6 (patch)
tree7f0cb05f3b99cd86e8512c789878b3aeae13cf24 /src/gui/widgets
parent9e378145294da33495d48b2c0742461ae6c2a3ba (diff)
downloadqt4-tools-5fd505cac71e97cf181c0d05867a77e640814fc6.tar.gz
Disable the unified toolbar before entering
fullscreen on Mac OS X. We are just enforcing what the documentation recommended. Task-number: QTBUG-13772 Reviewed-by: Samuel
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qmainwindow.cpp4
-rw-r--r--src/gui/widgets/qmainwindowlayout_p.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/src/gui/widgets/qmainwindow.cpp b/src/gui/widgets/qmainwindow.cpp
index 1183be6301..d971f61262 100644
--- a/src/gui/widgets/qmainwindow.cpp
+++ b/src/gui/widgets/qmainwindow.cpp
@@ -78,6 +78,7 @@ public:
: layout(0), explicitIconSize(false), toolButtonStyle(Qt::ToolButtonIconOnly)
#ifdef Q_WS_MAC
, useHIToolBar(false)
+ , activateUnifiedToolbarAfterFullScreen(false)
#endif
#if !defined(QT_NO_DOCKWIDGET) && !defined(QT_NO_CURSOR)
, hasOldCursor(false) , cursorAdjusted(false)
@@ -89,6 +90,7 @@ public:
Qt::ToolButtonStyle toolButtonStyle;
#ifdef Q_WS_MAC
bool useHIToolBar;
+ bool activateUnifiedToolbarAfterFullScreen;
#endif
void init();
QList<int> hoverSeparator;
@@ -1501,8 +1503,6 @@ bool QMainWindow::event(QEvent *event)
\i Before Qt 4.5, if you called showFullScreen() on the main window, the QToolbar would
disappear since it is considered to be part of the title bar. Qt 4.5 and up will now work around this by pulling
the toolbars out and back into the regular toolbar and vice versa when you swap out.
- However, a good practice would be that turning off the unified toolbar before you call
- showFullScreen() and restoring it after you call showNormal().
\endlist
Setting this back to false will remove these restrictions.
diff --git a/src/gui/widgets/qmainwindowlayout_p.h b/src/gui/widgets/qmainwindowlayout_p.h
index e1b981c1cd..3e1a95d1cf 100644
--- a/src/gui/widgets/qmainwindowlayout_p.h
+++ b/src/gui/widgets/qmainwindowlayout_p.h
@@ -335,6 +335,7 @@ public:
void cleanUpMacToolbarItems();
void fixSizeInUnifiedToolbar(QToolBar *tb) const;
bool useHIToolBar;
+ bool activateUnifiedToolbarAfterFullScreen;
void syncUnifiedToolbarVisibility();
bool blockVisiblityCheck;
#endif