Compare commits

...

2 Commits

Author SHA1 Message Date
zhuzichu 5240f826c5 update 2023-09-26 11:29:11 +08:00
zhuzichu 36da8cd785 update 2023-09-26 11:21:24 +08:00
4 changed files with 34 additions and 3 deletions

View File

@ -13,6 +13,13 @@ ProgressBar{
id:d
property real _radius: strokeWidth/2
}
onIndeterminateChanged:{
if(!indeterminate){
animator_x.duration = 0
rect_progress.x = 0
animator_x.duration = 888
}
}
background: Rectangle {
implicitWidth: 150
implicitHeight: control.strokeWidth
@ -34,6 +41,7 @@ ProgressBar{
radius: d._radius
color: control.color
PropertyAnimation on x {
id:animator_x
running: control.indeterminate && control.visible
from: -rect_progress.width
to:control.width+rect_progress.width
@ -57,4 +65,3 @@ ProgressBar{
}
}
}

View File

@ -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

View File

@ -13,6 +13,13 @@ ProgressBar{
id:d
property real _radius: strokeWidth/2
}
onIndeterminateChanged:{
if(!indeterminate){
animator_x.duration = 0
rect_progress.x = 0
animator_x.duration = 888
}
}
background: Rectangle {
implicitWidth: 150
implicitHeight: control.strokeWidth
@ -34,6 +41,7 @@ ProgressBar{
radius: d._radius
color: control.color
PropertyAnimation on x {
id:animator_x
running: control.indeterminate && control.visible
from: -rect_progress.width
to:control.width+rect_progress.width
@ -57,4 +65,3 @@ ProgressBar{
}
}
}

View File

@ -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
}
}