From bf339509e3a772b4f5a13bdc5ac62412e37cdfed Mon Sep 17 00:00:00 2001 From: Marco Martin Date: Thu, 12 Nov 2020 14:30:06 +0100 Subject: [PATCH] fix RTL for sliders colored area in sliders positioned correctly in RTL mode --- src/declarativeimports/plasmacomponents3/Slider.qml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmacomponents3/Slider.qml b/src/declarativeimports/plasmacomponents3/Slider.qml index 46b8f03ad..747ced4f9 100644 --- a/src/declarativeimports/plasmacomponents3/Slider.qml +++ b/src/declarativeimports/plasmacomponents3/Slider.qml @@ -71,7 +71,9 @@ T.Slider { y: parent.horizontal ? (parent.height - height) / 2 : parent.height - height width: Math.max(margins.left + margins.right, parent.horizontal - ? control.visualPosition * (parent.width - control.handle.width) + control.handle.width/2 + ? (Qt.application.layoutDirection === Qt.LeftToRight + ? control.visualPosition * (parent.width - control.handle.width) + control.handle.width/2 + : parent.width - control.visualPosition * (parent.width - control.handle.width) - control.handle.width/2) : parent.width) height: Math.max(margins.top + margins.bottom, parent.horizontal