diff options
author | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-07-29 13:34:31 (GMT) |
---|---|---|
committer | Denis Dzyubenko <denis.dzyubenko@nokia.com> | 2009-07-30 15:16:58 (GMT) |
commit | 9cbaefd4121ee082c402d5243f7ccb5e9d89456c (patch) | |
tree | 3c53c5b83b14b0b9713f2fd4ec18ab906e58d3ff | |
parent | efc7c605c5f561a75a718f8186e470bd24a18b4e (diff) | |
download | Qt-9cbaefd4121ee082c402d5243f7ccb5e9d89456c.zip Qt-9cbaefd4121ee082c402d5243f7ccb5e9d89456c.tar.gz Qt-9cbaefd4121ee082c402d5243f7ccb5e9d89456c.tar.bz2 |
Allow maximize button on the titlebar for a fixed size window
On Windows we will add maximize button to the titlebar even if the
window has a fixed size if the user explicitely asked for it by
setting Qt::CustomizeWindowHint | Qt::WindowMaximizeButtonHint.
Task-number: 250188
Reviewed-by: Leonardo Sobral Cunha
-rw-r--r-- | src/gui/kernel/qwidget_win.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp index f7ff2d0..13658fb 100644 --- a/src/gui/kernel/qwidget_win.cpp +++ b/src/gui/kernel/qwidget_win.cpp @@ -1558,6 +1558,11 @@ bool QWidgetPrivate::shouldShowMaximizeButton() { if (data.window_flags & Qt::MSWindowsFixedSizeDialogHint) return false; + // if the user explicitely asked for the maximize button, we try to add + // it even if the window has fixed size. + if (data.window_flags & Qt::CustomizeWindowHint && + data.window_flags & Qt::WindowMaximizeButtonHint) + return true; if (extra) { if ((extra->maxw && extra->maxw != QWIDGETSIZE_MAX && extra->maxw != QLAYOUTSIZE_MAX) || (extra->maxh && extra->maxh != QWIDGETSIZE_MAX && extra->maxh != QLAYOUTSIZE_MAX)) |