summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_win.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-07-29 13:34:31 (GMT)
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-07-30 15:13:32 (GMT)
commit989e195a4b7b0eb579dc4418dd47c2eca7e8b384 (patch)
tree4153cc1b65166506a0b6e8c3557fc21bfd167032 /src/gui/kernel/qwidget_win.cpp
parentf5a68dc15df4edb48e7bc41f9e918609b57f4356 (diff)
downloadQt-989e195a4b7b0eb579dc4418dd47c2eca7e8b384.zip
Qt-989e195a4b7b0eb579dc4418dd47c2eca7e8b384.tar.gz
Qt-989e195a4b7b0eb579dc4418dd47c2eca7e8b384.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
Diffstat (limited to 'src/gui/kernel/qwidget_win.cpp')
-rw-r--r--src/gui/kernel/qwidget_win.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/kernel/qwidget_win.cpp b/src/gui/kernel/qwidget_win.cpp
index 46fa3be..455d06d 100644
--- a/src/gui/kernel/qwidget_win.cpp
+++ b/src/gui/kernel/qwidget_win.cpp
@@ -1524,6 +1524,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))