diff options
author | Mikko Gronoff <mikko.gronoff@qt.io> | 2018-09-21 10:17:52 +0300 |
---|---|---|
committer | Mikko Gronoff <mikko.gronoff@qt.io> | 2018-09-21 10:20:20 +0300 |
commit | cd36ba030e95688c453873df5b391a5f847d562a (patch) | |
tree | 0aef28b4732fa6e8491ff8cb4cf8acd3dce96fdb /qml/BusyIndicator.qml | |
parent | 3ac7e7975a7e70dc42558a83dd7a24baf1992c8b (diff) | |
parent | ee06ee8e32d5512d69c4425ae7984410ee5afe5e (diff) |
Merge remote-tracking branch 'origin/5.11' into 5.12
* origin/5.11:
ee06ee8 Use a smoother looping animation in loading indicator
f8e7d81 media player: change default video
b3cc14b Use Material style only on devices with gpu
Change-Id: I097552a1d935e527f786cc160a322441be3ea167
Diffstat (limited to 'qml/BusyIndicator.qml')
-rw-r--r-- | qml/BusyIndicator.qml | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/qml/BusyIndicator.qml b/qml/BusyIndicator.qml index f2c9d80..2d45ef6 100644 --- a/qml/BusyIndicator.qml +++ b/qml/BusyIndicator.qml @@ -39,43 +39,44 @@ CircularIndicator { SequentialAnimation { running: true - // Fill 1/5 of the circle before starting looping + // Fill 20 degrees of the circle before starting looping NumberAnimation { target: circularIndicator - property: "endAngle" + property: "spanAngle" from: 0 - to: 72 + to: 20 duration: 200 } SequentialAnimation { loops: Animation.Infinite - // Fill rest of the circle + // Fill the circle, except have both caps still visible NumberAnimation { target: circularIndicator - property: "endAngle" - from: 72 - to: 360 + property: "spanAngle" + from: 20 + to: 345 duration: 800 } - // Fill 1/5 of the circle and clear previous fill + // Clear the circle, except for a 20 degree head start. The head start is to + // avoid an abrupt change in the cap of the indicator arc from an end to a beginning. ParallelAnimation { NumberAnimation { target: circularIndicator property: "startAngle" - from: -360 - to: 0 - duration: 200 + from: 0 + to: 360 + duration: 800 onStopped: circularIndicator.startAngle = 0 } NumberAnimation { target: circularIndicator - property: "endAngle" - from: 360 - to: 72 - duration: 200 + property: "spanAngle" + from: 345 + to: 20 + duration: 800 } } } |