Mac: a dialog should have a titlebar by default
Change 595deca5
for QTBUG-22316 resulted in having titlebars only on
modal dialogs.
Change-Id: Ic23c957e0e95cf567d90831e105cc402465df982
Reviewed-by: Gabriel de Dietrich <gabriel.dedietrich@digia.com>
This commit is contained in:
parent
00202e15fd
commit
53cee4a37a
@ -395,8 +395,11 @@ NSUInteger QCocoaWindow::windowStyleMask(Qt::WindowFlags flags)
|
||||
Qt::WindowMinMaxButtonsHint | Qt::WindowCloseButtonHint;
|
||||
if (flags == Qt::Window) {
|
||||
styleMask = (NSResizableWindowMask | NSClosableWindowMask | NSMiniaturizableWindowMask | NSTitledWindowMask);
|
||||
} else if ((flags & Qt::Dialog) && (window()->modality() != Qt::NonModal)) {
|
||||
styleMask = NSResizableWindowMask | NSTitledWindowMask;
|
||||
} else if (flags & Qt::Dialog) {
|
||||
if (window()->modality() == Qt::NonModal)
|
||||
styleMask = NSResizableWindowMask | NSClosableWindowMask | NSTitledWindowMask;
|
||||
else
|
||||
styleMask = NSResizableWindowMask | NSTitledWindowMask;
|
||||
} else if (!(flags & Qt::FramelessWindowHint)) {
|
||||
if ((flags & Qt::Dialog) || (flags & Qt::WindowMaximizeButtonHint))
|
||||
styleMask |= NSResizableWindowMask;
|
||||
|
Loading…
Reference in New Issue
Block a user