summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorThierry Bastian <thierry.bastian@nokia.com>2009-06-30 08:59:22 (GMT)
committerThierry Bastian <thierry.bastian@nokia.com>2009-06-30 08:59:22 (GMT)
commitaa5def2013cb362ddcb8cd4233f37ef936fe0302 (patch)
treefd89871c3666255d8c619d02245e25779c4aacb0 /src
parent06303a608cd45395fde897f97e58cbfaadc32366 (diff)
downloadQt-aa5def2013cb362ddcb8cd4233f37ef936fe0302.zip
Qt-aa5def2013cb362ddcb8cd4233f37ef936fe0302.tar.gz
Qt-aa5def2013cb362ddcb8cd4233f37ef936fe0302.tar.bz2
Fixed QLayout to take the maxi/min size into account for the menu bar
It was only taking the sizeHint into account Task-number: 141355 Reviewed-by: jasplin
Diffstat (limited to 'src')
-rw-r--r--src/gui/kernel/qlayout.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gui/kernel/qlayout.cpp b/src/gui/kernel/qlayout.cpp
index 3a3feb2..e750088 100644
--- a/src/gui/kernel/qlayout.cpp
+++ b/src/gui/kernel/qlayout.cpp
@@ -61,7 +61,10 @@ static int menuBarHeightForWidth(QWidget *menubar, int w)
int result = menubar->heightForWidth(qMax(w, menubar->minimumWidth()));
if (result != -1)
return result;
- result = menubar->sizeHint().height();
+ result = menubar->sizeHint()
+ .expandedTo(menubar->minimumSize())
+ .expandedTo(menubar->minimumSizeHint())
+ .boundedTo(menubar->maximumSize()).height();
if (result != -1)
return result;
}