macOS: Update window flags when updating content border thickness
The titlebarAppearsTransparent property of NSWindow depends on whether the window has a NSWindowStyleMaskTexturedBackground, so we need to re-apply the window flags after updating the style mask to ensure we pick up the updated value for titlebarAppearsTransparent. Amends a1e6fed44964a3eb14045bf819d232d6cbad9f59. Fixes: QTBUG-133525 Change-Id: Ifff594f54569ac43ad27917e5f4b2f8a3bae5901 Reviewed-by: Volker Hilsheimer <volker.hilsheimer@qt.io> (cherry picked from commit bddc0198297828ba29e5cf4b39e07412a506a551) Reviewed-by: Qt Cherry-pick Bot <cherrypick_bot@qt-project.org>
This commit is contained in:
parent
ea55328741
commit
260276642e
@ -2052,6 +2052,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
|
||||
|
||||
if (!m_drawContentBorderGradient) {
|
||||
window.styleMask = window.styleMask & ~NSWindowStyleMaskTexturedBackground;
|
||||
setWindowFlags(QPlatformWindow::window()->flags());
|
||||
[window.contentView.superview setNeedsDisplay:YES];
|
||||
return;
|
||||
}
|
||||
@ -2077,6 +2078,7 @@ void QCocoaWindow::applyContentBorderThickness(NSWindow *window)
|
||||
int effectiveBottomContentBorderThickness = 0;
|
||||
|
||||
[window setStyleMask:[window styleMask] | NSWindowStyleMaskTexturedBackground];
|
||||
setWindowFlags(QPlatformWindow::window()->flags());
|
||||
|
||||
// Setting titlebarAppearsTransparent to YES means that the border thickness has to account
|
||||
// for the title bar height as well, otherwise sheets will not be presented at the correct
|
||||
|
Loading…
x
Reference in New Issue
Block a user