summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/widgets/styles/qstylesheetstyle.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/widgets/styles/qstylesheetstyle.cpp b/src/widgets/styles/qstylesheetstyle.cpp
index 8e77ae0e44..d63c96bf0e 100644
--- a/src/widgets/styles/qstylesheetstyle.cpp
+++ b/src/widgets/styles/qstylesheetstyle.cpp
@@ -5542,9 +5542,9 @@ QRect QStyleSheetStyle::subControlRect(ComplexControl cc, const QStyleOptionComp
} else {
sliderlen = maxlen;
}
-
+ const int sliderPosition = sb->orientation == Qt::Horizontal && sb->direction == Qt::RightToLeft ? sb->maximum - sb->sliderPosition + sb->minimum : sb->sliderPosition;
int sliderstart = (styleOptionSlider.orientation == Qt::Horizontal ? contentRect.left() : contentRect.top())
- + sliderPositionFromValue(sb->minimum, sb->maximum, sb->sliderPosition,
+ + sliderPositionFromValue(sb->minimum, sb->maximum, sliderPosition,
maxlen - sliderlen, sb->upsideDown);
QRect sr = (sb->orientation == Qt::Horizontal)