修复FluProgressBar属性错误

This commit is contained in:
Polaris-Night 2025-02-18 23:01:01 +08:00
parent 65b7737454
commit 99f6b16aa1
2 changed files with 10 additions and 14 deletions

View File

@ -14,13 +14,6 @@ ProgressBar{
id:d id:d
property real _radius: strokeWidth/2 property real _radius: strokeWidth/2
} }
onIndeterminateChanged:{
if(!indeterminate){
animator_x.duration = 0
rect_progress.x = 0
animator_x.duration = control.duration
}
}
background: Rectangle { background: Rectangle {
implicitWidth: 150 implicitWidth: 150
implicitHeight: control.strokeWidth implicitHeight: control.strokeWidth
@ -45,6 +38,11 @@ ProgressBar{
id: animator_x id: animator_x
running: control.indeterminate && control.visible running: control.indeterminate && control.visible
loops: Animation.Infinite loops: Animation.Infinite
onRunningChanged: {
if(!running){
rect_progress.x = 0
}
}
PropertyAnimation { PropertyAnimation {
from: -rect_progress.width from: -rect_progress.width
to: control.width + rect_progress.width to: control.width + rect_progress.width

View File

@ -15,13 +15,6 @@ ProgressBar{
id:d id:d
property real _radius: strokeWidth/2 property real _radius: strokeWidth/2
} }
onIndeterminateChanged:{
if(!indeterminate){
animator_x.duration = 0
rect_progress.x = 0
animator_x.duration = control.duration
}
}
background: Rectangle { background: Rectangle {
implicitWidth: 150 implicitWidth: 150
implicitHeight: control.strokeWidth implicitHeight: control.strokeWidth
@ -46,6 +39,11 @@ ProgressBar{
id: animator_x id: animator_x
running: control.indeterminate && control.visible running: control.indeterminate && control.visible
loops: Animation.Infinite loops: Animation.Infinite
onRunningChanged: {
if(!running){
rect_progress.x = 0
}
}
PropertyAnimation { PropertyAnimation {
from: -rect_progress.width from: -rect_progress.width
to: control.width + rect_progress.width to: control.width + rect_progress.width