diff options
author | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-30 08:59:22 (GMT) |
---|---|---|
committer | Thierry Bastian <thierry.bastian@nokia.com> | 2009-06-30 08:59:22 (GMT) |
commit | aa5def2013cb362ddcb8cd4233f37ef936fe0302 (patch) | |
tree | fd89871c3666255d8c619d02245e25779c4aacb0 /src | |
parent | 06303a608cd45395fde897f97e58cbfaadc32366 (diff) | |
download | Qt-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.cpp | 5 |
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; } |