diff --git a/src/Qt5/imports/FluentUI/Controls/FluProgressRing.qml b/src/Qt5/imports/FluentUI/Controls/FluProgressRing.qml index c77dd256..63e7a9cb 100644 --- a/src/Qt5/imports/FluentUI/Controls/FluProgressRing.qml +++ b/src/Qt5/imports/FluentUI/Controls/FluProgressRing.qml @@ -19,6 +19,13 @@ ProgressBar{ border.color: control.backgroundColor border.width: control.strokeWidth } + onIndeterminateChanged:{ + if(!indeterminate){ + animator_r.duration = 0 + layout_item.rotation = 0 + animator_r.duration = 888 + } + } QtObject{ id:d property real _radius: control.width/2-control.strokeWidth/2 @@ -34,7 +41,9 @@ ProgressBar{ } } contentItem: Item { + id:layout_item RotationAnimation on rotation { + id:animator_r running: control.indeterminate && control.visible from: 0 to:360 diff --git a/src/Qt6/imports/FluentUI/Controls/FluProgressRing.qml b/src/Qt6/imports/FluentUI/Controls/FluProgressRing.qml index 899be890..b8b88f08 100644 --- a/src/Qt6/imports/FluentUI/Controls/FluProgressRing.qml +++ b/src/Qt6/imports/FluentUI/Controls/FluProgressRing.qml @@ -19,6 +19,13 @@ ProgressBar{ border.color: control.backgroundColor border.width: control.strokeWidth } + onIndeterminateChanged:{ + if(!indeterminate){ + animator_r.duration = 0 + layout_item.rotation = 0 + animator_r.duration = 888 + } + } QtObject{ id:d property real _radius: control.width/2-control.strokeWidth/2 @@ -34,7 +41,9 @@ ProgressBar{ } } contentItem: Item { + id:layout_item RotationAnimation on rotation { + id:animator_r running: control.indeterminate && control.visible from: 0 to:360 @@ -71,4 +80,3 @@ ProgressBar{ anchors.centerIn: parent } } -