summaryrefslogtreecommitdiffstats
path: root/src/gui/kernel/qwidget_win.cpp
diff options
context:
space:
mode:
authorDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-07-29 15:34:31 +0200
committerDenis Dzyubenko <denis.dzyubenko@nokia.com>2009-07-30 17:16:58 +0200
commit9cbaefd4121ee082c402d5243f7ccb5e9d89456c (patch)
tree3c53c5b83b14b0b9713f2fd4ec18ab906e58d3ff /src/gui/kernel/qwidget_win.cpp
parentefc7c605c5f561a75a718f8186e470bd24a18b4e (diff)
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 f7ff2d038e..13658fb1fc 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))