Trigger repaint of window when toggling unified toolbar on or off.

Change-Id: I5204e5c65ae3cf84459cc62f587ecccd855e02f8
Reviewed-by: Morten Johan Sørvig <morten.sorvig@digia.com>
This commit is contained in:
Jake Petroules 2014-05-08 00:50:47 -04:00 committed by The Qt Project
parent a82249a47b
commit 5d2939344e
2 changed files with 4 additions and 0 deletions

View File

@ -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()

View File

@ -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