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:
Shawn Rutledge 2013-04-05 15:09:15 +02:00 committed by The Qt Project
parent 00202e15fd
commit 53cee4a37a

View File

@ -395,7 +395,10 @@ 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)) {
} 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))