From 8ac9addd946637401e4685c6e91d1a3cd5b2d768 Mon Sep 17 00:00:00 2001 From: Gabriel de Dietrich Date: Tue, 10 Oct 2017 10:54:08 -0700 Subject: QCocoaWindow: Toggle titlebar transparency to support unified toolbar This is need from macOS 10.13 onwards. See NSWindow related notes on https://developer.apple.com/library/content/releasenotes/AppKit/RN-AppKit/ Change-Id: I4b4653d7342de985d22b128d73940e7163bdb1e8 Task-number: QTBUG-63444 Reviewed-by: Jake Petroules --- src/plugins/platforms/cocoa/qcocoawindow.mm | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/plugins') diff --git a/src/plugins/platforms/cocoa/qcocoawindow.mm b/src/plugins/platforms/cocoa/qcocoawindow.mm index 6ef459566a..c6fa6795c1 100644 --- a/src/plugins/platforms/cocoa/qcocoawindow.mm +++ b/src/plugins/platforms/cocoa/qcocoawindow.mm @@ -2161,6 +2161,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window) if (!m_drawContentBorderGradient) { [window setStyleMask:[window styleMask] & ~NSTexturedBackgroundWindowMask]; [[[window contentView] superview] setNeedsDisplay:YES]; + window.titlebarAppearsTransparent = NO; return; } @@ -2185,6 +2186,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window) int effectiveBottomContentBorderThickness = m_bottomContentBorderThickness; [window setStyleMask:[window styleMask] | NSTexturedBackgroundWindowMask]; + window.titlebarAppearsTransparent = YES; [window setContentBorderThickness:effectiveTopContentBorderThickness forEdge:NSMaxYEdge]; [window setAutorecalculatesContentBorderThickness:NO forEdge:NSMaxYEdge]; -- cgit v1.2.3