summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSami Merilä <sami.merila@nokia.com>2009-06-10 09:22:36 (GMT)
committerSami Merilä <sami.merila@nokia.com>2009-06-10 09:22:36 (GMT)
commit00f2dd2175f80736442a3eb8443499c02062b3fa (patch)
tree6c3194a4e7ce324342daeb3d1234181bf09524fd /src
parent0b5b2664d5ca6dfbe9c6a0170bbd2caaa47ccd3b (diff)
downloadQt-00f2dd2175f80736442a3eb8443499c02062b3fa.zip
Qt-00f2dd2175f80736442a3eb8443499c02062b3fa.tar.gz
Qt-00f2dd2175f80736442a3eb8443499c02062b3fa.tar.bz2
S60Style: Fix scrollbar error, when scrollbar PM minimum length is less than its width on horizontal scrollbar (and height on vertical scrollbar).
Diffstat (limited to 'src')
-rw-r--r--src/gui/styles/qs60style.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/gui/styles/qs60style.cpp b/src/gui/styles/qs60style.cpp
index 180937f..6ee63e6 100644
--- a/src/gui/styles/qs60style.cpp
+++ b/src/gui/styles/qs60style.cpp
@@ -2342,6 +2342,11 @@ QRect QS60Style::subControlRect(ComplexControl control, const QStyleOptionComple
sliderlen = (qint64(scrollbarOption->pageStep) * maxlen) / (range + scrollbarOption->pageStep);
int slidermin = pixelMetric(PM_ScrollBarSliderMin, scrollbarOption, widget);
+ if (isHorizontal && slidermin < scrollBarRect.height())
+ slidermin = scrollBarRect.height();
+ else if (!isHorizontal && slidermin < scrollBarRect.width())
+ slidermin = scrollBarRect.width();
+
if (sliderlen < slidermin || range > (INT_MAX>>1))
sliderlen = slidermin;
if (sliderlen > maxlen)