summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Android/drawables/AnimationDrawable.qml
diff options
context:
space:
mode:
authorFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-27 18:04:58 +0100
committerFrederik Gladhorn <frederik.gladhorn@theqtcompany.com>2014-11-27 18:04:58 +0100
commit71314570d03631f50ab2c262011aba6a572d0ced (patch)
tree6d0c663ad313af89efff8e7b0fdafe6a28b19505 /src/controls/Styles/Android/drawables/AnimationDrawable.qml
parent3704a616dfabb71ebd3ffc64f8efe32931c82a8b (diff)
parentea099e341b5f8845be56f81b22e44a8b6cb227a2 (diff)
downloadqtquickcontrols-71314570d03631f50ab2c262011aba6a572d0ced.tar.gz
Merge remote-tracking branch 'origin/5.4.0' into 5.4
Change-Id: I4c81a7852e7041328b7cfa320e907cc3cb863f04
Diffstat (limited to 'src/controls/Styles/Android/drawables/AnimationDrawable.qml')
-rw-r--r--src/controls/Styles/Android/drawables/AnimationDrawable.qml5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/controls/Styles/Android/drawables/AnimationDrawable.qml b/src/controls/Styles/Android/drawables/AnimationDrawable.qml
index a522bfa7..12d576ff 100644
--- a/src/controls/Styles/Android/drawables/AnimationDrawable.qml
+++ b/src/controls/Styles/Android/drawables/AnimationDrawable.qml
@@ -49,14 +49,17 @@ Drawable {
property int currentFrame: 0
readonly property int frameCount: styleDef.frames ? styleDef.frames.length : 0
readonly property var frameDef: styleDef.frames ? styleDef.frames[currentFrame] : undefined
+ readonly property alias running: timer.running
+ property bool oneshot: styleDef.oneshot
Timer {
+ id: timer
repeat: true
running: root.frameCount && root.visible && Qt.application.active
interval: root.frameDef ? root.frameDef.duration : 0
onTriggered: {
var frame = root.currentFrame + 1
- repeat = !root.styleDef.oneshot || frame < root.frameCount - 1
+ repeat = !root.oneshot || frame < root.frameCount - 1
root.currentFrame = frame % root.frameCount
}
}