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 <jake.petroules@qt.io>bb10
parent
e03b64c5b1
commit
8ac9addd94
|
|
@ -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];
|
||||
|
|
|
|||
Loading…
Reference in New Issue