summaryrefslogtreecommitdiffstats
path: root/src/gui/widgets
diff options
context:
space:
mode:
authorFabien Freling <fabien.freling@nokia.com>2011-02-24 15:36:44 (GMT)
committerFabien Freling <fabien.freling@nokia.com>2011-02-25 10:09:02 (GMT)
commit2b9e7bcede5ca6ba9de2534839244cc621f17e1c (patch)
tree477d5077cc2dcfb0a6ba2a576445f4640ecba837 /src/gui/widgets
parentf41e395e9ebc6db33c21ff082b59f2d7b6d2a3b2 (diff)
downloadQt-2b9e7bcede5ca6ba9de2534839244cc621f17e1c.zip
Qt-2b9e7bcede5ca6ba9de2534839244cc621f17e1c.tar.gz
Qt-2b9e7bcede5ca6ba9de2534839244cc621f17e1c.tar.bz2
Add the ability to remove a toolbar from the unified toolbar.
This allows to toggle the unified look of the toolbar. This is useful for apps going fullscreen since we have to turn the unified look off when entering fullscreen mode. Reviewed-by: Samuel Rødal
Diffstat (limited to 'src/gui/widgets')
-rw-r--r--src/gui/widgets/qmainwindowlayout_mac.mm6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/widgets/qmainwindowlayout_mac.mm b/src/gui/widgets/qmainwindowlayout_mac.mm
index e428ffc..761a433 100644
--- a/src/gui/widgets/qmainwindowlayout_mac.mm
+++ b/src/gui/widgets/qmainwindowlayout_mac.mm
@@ -356,10 +356,10 @@ void QMainWindowLayout::updateHIToolBarStatus()
while (!qtoolbarsInUnifiedToolbarList.isEmpty()) {
// Should shrink the list by one every time.
QToolBar *toolbar = qtoolbarsInUnifiedToolbarList.first();
- layoutState.mainWindow->addToolBar(Qt::TopToolBarArea, toolbar);
#if defined(QT_MAC_USE_COCOA)
- toolbar->d_func()->isInUnifiedToolbar = false;
+ unifiedSurface->removeToolbar(toolbar);
#endif
+ layoutState.mainWindow->addToolBar(Qt::TopToolBarArea, toolbar);
}
macWindowToolbarSet(qt_mac_window_for(layoutState.mainWindow), 0);
} else {
@@ -393,7 +393,7 @@ void QMainWindowLayout::insertIntoMacToolbar(QToolBar *before, QToolBar *toolbar
return;
#if defined(QT_MAC_USE_COCOA)
- // toolbar will now become native (if not allready) since we need
+ // toolbar will now become native (if not already) since we need
// an nsview for it inside the corresponding NSToolbarItem.
// Setting isInUnifiedToolbar will (among other things) stop alien
// siblings from becoming native when this happends since the toolbar