Compare commits

..

3 Commits

2 changed files with 14 additions and 10 deletions

View File

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

View File

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