From 01b7135299799ba6ec2f652bf642c502638bd03f Mon Sep 17 00:00:00 2001 From: David Edmundson Date: Wed, 13 Jun 2012 22:48:22 +0100 Subject: [PATCH] Make sure in slider the background moves at the same speed as the handle when changing value. This fixes UI artifacts. REVIEW: 105236 --- declarativeimports/plasmacomponents/qml/Slider.qml | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/declarativeimports/plasmacomponents/qml/Slider.qml b/declarativeimports/plasmacomponents/qml/Slider.qml index 2d4e98ae3..d2c70561b 100644 --- a/declarativeimports/plasmacomponents/qml/Slider.qml +++ b/declarativeimports/plasmacomponents/qml/Slider.qml @@ -195,6 +195,15 @@ Item { x: inverted ? handle.x : 0 anchors.verticalCenter: parent.verticalCenter + //use the same animation when resizing a slider as moving the slider this keeps it in line when using key shortcuts + Behavior on width { + enabled: !mouseArea.drag.active && contents.animated + PropertyAnimation { + duration: behavior.enabled ? 150 : 0 + easing.type: Easing.OutSine + } + } + visible: range.position > 0 && slider.enabled }