diff --git a/src/declarativeimports/plasmacomponents3/RangeSlider.qml b/src/declarativeimports/plasmacomponents3/RangeSlider.qml index 6d73d93cc..85a8d646d 100644 --- a/src/declarativeimports/plasmacomponents3/RangeSlider.qml +++ b/src/declarativeimports/plasmacomponents3/RangeSlider.qml @@ -23,8 +23,8 @@ T.RangeSlider { } first.handle: Item { property bool horizontal: control.orientation === Qt.Horizontal - x: control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) - y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height)) + x: Math.round(control.leftPadding + (horizontal ? control.first.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)) + y: Math.round(control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.first.visualPosition * (control.availableHeight - height))) width: grooveSvg.hasElement("hint-handle-size") ? grooveSvg.elementSize("hint-handle-size").width : firstHandle.width height: grooveSvg.hasElement("hint-handle-size") ? grooveSvg.elementSize("hint-handle-size").height : firstHandle.height diff --git a/src/declarativeimports/plasmacomponents3/Slider.qml b/src/declarativeimports/plasmacomponents3/Slider.qml index 8b5aeefa6..46b8f03ad 100644 --- a/src/declarativeimports/plasmacomponents3/Slider.qml +++ b/src/declarativeimports/plasmacomponents3/Slider.qml @@ -26,8 +26,8 @@ T.Slider { } handle: Item { property bool horizontal: control.orientation === Qt.Horizontal - x: control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2) - y: control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height)) + x: Math.round(control.leftPadding + (horizontal ? control.visualPosition * (control.availableWidth - width) : (control.availableWidth - width) / 2)) + y: Math.round(control.topPadding + (horizontal ? (control.availableHeight - height) / 2 : control.visualPosition * (control.availableHeight - height))) width: grooveSvg.hasElement("hint-handle-size") ? grooveSvg.elementSize("hint-handle-size").width : firstHandle.width height: grooveSvg.hasElement("hint-handle-size") ? grooveSvg.elementSize("hint-handle-size").height : firstHandle.height