diff --git a/src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml b/src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml index 25f1eeec..9e8265c2 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml @@ -13,6 +13,13 @@ ProgressBar{ id:d property real _radius: strokeWidth/2 } + onIndeterminateChanged:{ + if(!indeterminate){ + animator_x.duration = 0 + rect_progress.x = 0 + animator_x.duration = 888 + } + } background: Rectangle { implicitWidth: 150 implicitHeight: control.strokeWidth @@ -34,6 +41,7 @@ ProgressBar{ radius: d._radius color: control.color PropertyAnimation on x { + id:animator_x running: control.indeterminate && control.visible from: -rect_progress.width to:control.width+rect_progress.width @@ -57,4 +65,3 @@ ProgressBar{ } } } - diff --git a/src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml b/src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml index 421e9e47..b8dd6207 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml @@ -13,6 +13,13 @@ ProgressBar{ id:d property real _radius: strokeWidth/2 } + onIndeterminateChanged:{ + if(!indeterminate){ + animator_x.duration = 0 + rect_progress.x = 0 + animator_x.duration = 888 + } + } background: Rectangle { implicitWidth: 150 implicitHeight: control.strokeWidth @@ -34,6 +41,7 @@ ProgressBar{ radius: d._radius color: control.color PropertyAnimation on x { + id:animator_x running: control.indeterminate && control.visible from: -rect_progress.width to:control.width+rect_progress.width @@ -57,4 +65,3 @@ ProgressBar{ } } } -