From 472f4212a9496c6bc3aea347b66bbb9ab6f0c630 Mon Sep 17 00:00:00 2001 From: David Redondo Date: Wed, 11 Nov 2020 12:19:12 +0100 Subject: [PATCH] Finish the animation before changing the length of the progressbar highlight This messes with the running animation and can lead to it overshooting the track. BUG:428955 --- src/declarativeimports/plasmacomponents3/ProgressBar.qml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/declarativeimports/plasmacomponents3/ProgressBar.qml b/src/declarativeimports/plasmacomponents3/ProgressBar.qml index 8bc27e2df..5c796293e 100644 --- a/src/declarativeimports/plasmacomponents3/ProgressBar.qml +++ b/src/declarativeimports/plasmacomponents3/ProgressBar.qml @@ -21,7 +21,7 @@ T.ProgressBar { PlasmaCore.FrameSvgItem { id: indicator height: parent.height - width: control.indeterminate ? units.gridUnit * 2 : parent.width * control.position + width: parent.width * control.position imagePath: "widgets/bar_meter_horizontal" prefix: "bar-active" colorGroup: PlasmaCore.ColorScope.colorGroup @@ -35,6 +35,9 @@ T.ProgressBar { alwaysRunToEnd: true running: control.indeterminate && control.visible + onStarted: indicator.width = units.gridUnit * 2 + onStopped: indicator.width = parent.width * control.position + PropertyAnimation { target: indicator property: "x"