summaryrefslogtreecommitdiff
path: root/src/controls/Styles/Android/drawables/AnimationDrawable.qml
diff options
context:
space:
mode:
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
}
}