From 00f2dd2175f80736442a3eb8443499c02062b3fa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sami=20Meril=C3=A4?= Date: Wed, 10 Jun 2009 12:22:36 +0300 Subject: S60Style: Fix scrollbar error, when scrollbar PM minimum length is less than its width on horizontal scrollbar (and height on vertical scrollbar). --- src/gui/styles/qs60style.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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) -- cgit v0.12