Skip to content

Commit 99f6b16

Browse files
committed
修复FluProgressBar属性错误
1 parent 65b7737 commit 99f6b16

File tree

2 files changed

+10
-14
lines changed

2 files changed

+10
-14
lines changed

src/Qt5/imports/FluentUI/Controls/FluProgressBar.qml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,6 @@ ProgressBar{
1414
id:d
1515
property real _radius: strokeWidth/2
1616
}
17-
onIndeterminateChanged:{
18-
if(!indeterminate){
19-
animator_x.duration = 0
20-
rect_progress.x = 0
21-
animator_x.duration = control.duration
22-
}
23-
}
2417
background: Rectangle {
2518
implicitWidth: 150
2619
implicitHeight: control.strokeWidth
@@ -45,6 +38,11 @@ ProgressBar{
4538
id: animator_x
4639
running: control.indeterminate && control.visible
4740
loops: Animation.Infinite
41+
onRunningChanged: {
42+
if(!running){
43+
rect_progress.x = 0
44+
}
45+
}
4846
PropertyAnimation {
4947
from: -rect_progress.width
5048
to: control.width + rect_progress.width

src/Qt6/imports/FluentUI/Controls/FluProgressBar.qml

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,13 +15,6 @@ ProgressBar{
1515
id:d
1616
property real _radius: strokeWidth/2
1717
}
18-
onIndeterminateChanged:{
19-
if(!indeterminate){
20-
animator_x.duration = 0
21-
rect_progress.x = 0
22-
animator_x.duration = control.duration
23-
}
24-
}
2518
background: Rectangle {
2619
implicitWidth: 150
2720
implicitHeight: control.strokeWidth
@@ -46,6 +39,11 @@ ProgressBar{
4639
id: animator_x
4740
running: control.indeterminate && control.visible
4841
loops: Animation.Infinite
42+
onRunningChanged: {
43+
if(!running){
44+
rect_progress.x = 0
45+
}
46+
}
4947
PropertyAnimation {
5048
from: -rect_progress.width
5149
to: control.width + rect_progress.width

0 commit comments

Comments
 (0)