Cocoa: Make dialogs non-resizable again
Fix regression from commit 8b3a120a
where also dialogs
got NSResizableWindowMask, making them have a Zoom
button.
Task-number: QTBUG-65668
Change-Id: I21054b3aa6fc11eab3d93f78ede44ae771522e2c
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@qt.io>
This commit is contained in:
parent
91732818e5
commit
f0b8d90402
@ -503,9 +503,10 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
|
||||
{
|
||||
const Qt::WindowType type = static_cast<Qt::WindowType>(int(flags & Qt::WindowType_Mask));
|
||||
const bool frameless = (flags & Qt::FramelessWindowHint) || windowIsPopupType(type);
|
||||
const bool resizeable = type != Qt::Dialog; // Dialogs: remove zoom button by disabling resize
|
||||
|
||||
// Select base window type.
|
||||
NSUInteger styleMask = frameless ? NSBorderlessWindowMask : NSResizableWindowMask;
|
||||
// Select base window type. Note that the value of NSBorderlessWindowMask is 0.
|
||||
NSUInteger styleMask = (frameless || !resizeable) ? NSBorderlessWindowMask : NSResizableWindowMask;
|
||||
|
||||
if (frameless) {
|
||||
// No further customizations for frameless since there are no window decorations.
|
||||
|
Loading…
Reference in New Issue
Block a user