fix RTL for sliders

colored area in sliders positioned correctly in RTL mode
This commit is contained in:
Marco Martin 2020-11-12 14:30:06 +01:00
parent d66afc1fd0
commit bf339509e3

View File

@ -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