summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJake Petroules <jake.petroules@petroules.com>2014-05-08 00:50:47 -0400
committerThe Qt Project <gerrit-noreply@qt-project.org>2014-05-22 02:52:54 +0200
commit5d2939344eb8fbd3c2115f52a7a8d47365bdf820 (patch)
treed5043b7a6485482d93b0be57f51912166bd4818a
parenta82249a47b6fe8dd6729a6cf85349d6b3346d71a (diff)
Trigger repaint of window when toggling unified toolbar on or off.
Change-Id: I5204e5c65ae3cf84459cc62f587ecccd855e02f8 Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
-rw-r--r--src/plugins/platforms/cocoa/qcocoawindow.mm3
-rw-r--r--src/widgets/widgets/qmainwindow.cpp1
2 files changed, 4 insertions, 0 deletions
diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm
index 60152b56b2..651fedb26e 100644
--- a/src/plugins/platforms/cocoa/qcocoawindow.mm
+++ b/src/plugins/platforms/cocoa/qcocoawindow.mm
@@ -1620,6 +1620,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
if (!m_drawContentBorderGradient) {
[window setStyleMask:[window styleMask] & ~NSTexturedBackgroundWindowMask];
+ [[[window contentView] superview] setNeedsDisplay:YES];
return;
}
@@ -1650,6 +1651,8 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
[window setContentBorderThickness:effectiveBottomContentBorderThickness forEdge:NSMinYEdge];
[window setAutorecalculatesContentBorderThickness:NO forEdge:NSMinYEdge];
+
+ [[[window contentView] superview] setNeedsDisplay:YES];
}
void QCocoaWindow::updateNSToolbar()
diff --git a/src/widgets/widgets/qmainwindow.cpp b/src/widgets/widgets/qmainwindow.cpp
index 90cfb1d7cb..358569a5e4 100644
--- a/src/widgets/widgets/qmainwindow.cpp
+++ b/src/widgets/widgets/qmainwindow.cpp
@@ -1519,6 +1519,7 @@ void QMainWindow::setUnifiedTitleAndToolBarOnMac(bool set)
typedef void (*SetContentBorderEnabledFunction)(QWindow *window, bool enable);
(reinterpret_cast<SetContentBorderEnabledFunction>(function))(window()->windowHandle(), set);
+ update();
}
#endif