Fix for horizontal scrollbars
Horizontal scrollbars scroll in the wrong direction when the app has a stylesheet and the LayoutDirection is RightToLeft. Change-Id: I860cb733709e8d59a7b844f2b6ed1ee63410956e Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
This commit is contained in:
parent
ee7a5a94f9
commit
00c9ec63a5
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user