summaryrefslogtreecommitdiffstats
path: root/src/gui/styles
diff options
context:
space:
mode:
authorSami Merila <sami.merila@nokia.com>2010-10-18 10:37:36 (GMT)
committerSami Merila <sami.merila@nokia.com>2010-10-18 10:37:36 (GMT)
commit58af8685bbc2f23a62045b413e46ad7811e47c56 (patch)
tree5ba1b0aa0c71c7f62aa5589cae471ac18a075ab8 /src/gui/styles
parent1cc498e36725e4019afad367b08e992e5e497be4 (diff)
downloadQt-58af8685bbc2f23a62045b413e46ad7811e47c56.zip
Qt-58af8685bbc2f23a62045b413e46ad7811e47c56.tar.gz
Qt-58af8685bbc2f23a62045b413e46ad7811e47c56.tar.bz2
QS60Style: ComboBox disappears after orientation switch
This is due to that QS60Style uses desktop area for a bounding rect of combobox content to disallow it to grow outside of screen size. Unfortunately with some recent changes to screensize handling in desktop widget size makes the desktop resize to happen later than when style is asked for combobox size. So, style returns invalid QSize for combobox content size. As a fix, if the returned size is invalid, ask it directly from QCommonStyle. Task-number: QTBUG-14423 Reviewed-by: Janne Anttila
Diffstat (limited to 'src/gui/styles')
-rw-r--r--src/gui/styles/qs60style.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 1e32bd8..50e8a5b 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2620,6 +2620,8 @@ QSize QS60Style::sizeFromContents(ContentsType ct, const QStyleOption *opt,
sz = QCommonStyle::sizeFromContents( ct, opt, csz, widget);
break;
}
+ if (!sz.isValid())
+ sz = QCommonStyle::sizeFromContents(ct, opt, csz, widget);
return sz;
}