From 5240f826c55090f95b5fdc48a1e616e744ae4453 Mon Sep 17 00:00:00 2001 From: zhuzichu Date: Tue, 26 Sep 2023 11:29:11 +0800 Subject: [PATCH] update --- src/Qt5/imports/FluentUI/Controls/FluProgressRing.qml | 9 +++++++++ src/Qt6/imports/FluentUI/Controls/FluProgressRing.qml | 10 +++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) 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 } } -