summaryrefslogtreecommitdiffstats
path: root/src/widgets/widgets/qtoolbarlayout.cpp
diff options
context:
space:
mode:
authorMorten Johan Sørvig <morten.sorvig@digia.com>2014-03-31 12:19:20 +0200
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-04-09 20:53:06 +0200
commit0f2acaf1cb6be5290f64842667e60b6675b467c4 (patch)
tree50392234431c5147fa0492fd1ccfb0a27ba10ad4 /src/widgets/widgets/qtoolbarlayout.cpp
parentb2a6c9ec3ef37f571aca2ce1c48d346d4f09a305 (diff)
Cocoa: Update unified toolbar area on toolbar hide
Add setContentBorderAreaEnabled() which us used to enable or disable an area. Used together with registerContentBorderArea() this allows changing the border area geometry and enabled status independently. Add section to the QToolBar show/hide event handler which calls setContentBorderAreaEnabled(). Make sure QToolBar and QToolBarLayout uses the same identifier - the QToolBar object pointer. Rename enableContentBorderArea -> setContentBorderEnabled. The "ContentBorder" is now the entire unified toolbar area while "ContentBorderArea"s are the sub-areas covered by toolbars. Change-Id: I339f381a50856e048ae40e7ffadd6a8a510c4994 Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
Diffstat (limited to 'src/widgets/widgets/qtoolbarlayout.cpp')
-rw-r--r--src/widgets/widgets/qtoolbarlayout.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/widgets/qtoolbarlayout.cpp b/src/widgets/widgets/qtoolbarlayout.cpp
index 020d180778..efd33da7fc 100644
--- a/src/widgets/widgets/qtoolbarlayout.cpp
+++ b/src/widgets/widgets/qtoolbarlayout.cpp
@@ -369,9 +369,9 @@ void QToolBarLayout::updateMacBorderMetrics()
typedef void (*RegisterContentBorderAreaFunction)(QWindow *window, void *identifier, int upper, int lower);
if (mainWindow->toolBarArea(tb) == Qt::TopToolBarArea) {
- (reinterpret_cast<RegisterContentBorderAreaFunction>(function))(tb->window()->windowHandle(), this, upper.y(), lower.y());
+ (reinterpret_cast<RegisterContentBorderAreaFunction>(function))(tb->window()->windowHandle(), tb, upper.y(), lower.y());
} else {
- (reinterpret_cast<RegisterContentBorderAreaFunction>(function))(tb->window()->windowHandle(), this, 0, 0);
+ (reinterpret_cast<RegisterContentBorderAreaFunction>(function))(tb->window()->windowHandle(), tb, 0, 0);
}
#endif
}