Commit ea3e9c68 authored by eekkelund's avatar eekkelund

Add start() and stop(). Change durations to make spinner spin faster

parent 7cdef75f
...@@ -35,6 +35,17 @@ import QtQuick.Controls.Nemo 1.0 ...@@ -35,6 +35,17 @@ import QtQuick.Controls.Nemo 1.0
Item { Item {
id: container id: container
function stop() {
if(state=="enabled") {
state=""
}
}
function start() {
if(state!="enabled") {
state="enabled"
}
}
states: [ states: [
State { name: "enabled"; when: enabled } State { name: "enabled"; when: enabled }
] ]
...@@ -49,7 +60,7 @@ Item { ...@@ -49,7 +60,7 @@ Item {
targets: [circle0, circle1, circle2, circle3] targets: [circle0, circle1, circle2, circle3]
property: "opacity" property: "opacity"
to: 1 to: 1
duration: 1500 duration: 700
} }
PropertyAction { target: animations; property: "running"; value: true } PropertyAction { target: animations; property: "running"; value: true }
} }
...@@ -64,13 +75,13 @@ Item { ...@@ -64,13 +75,13 @@ Item {
targets: [circle0, circle1, circle2, circle3] targets: [circle0, circle1, circle2, circle3]
property: "color"; property: "color";
to: Theme.backgroundAccentColor to: Theme.backgroundAccentColor
duration: 500 duration: 400
} }
NumberAnimation { NumberAnimation {
targets: [circle0, circle1, circle2, circle3] targets: [circle0, circle1, circle2, circle3]
property: "opacity" property: "opacity"
to: 0 to: 0
duration: 1500 duration: 700
} }
} }
} }
...@@ -140,13 +151,13 @@ Item { ...@@ -140,13 +151,13 @@ Item {
target: circle0 target: circle0
property: "color" property: "color"
to: Theme.accentColor to: Theme.accentColor
duration: 500 duration: 400
} }
PropertyAnimation { PropertyAnimation {
target: circle3 target: circle3
property: "color" property: "color"
to: Theme.backgroundAccentColor to: Theme.backgroundAccentColor
duration: 500 duration: 400
} }
} }
...@@ -155,13 +166,13 @@ Item { ...@@ -155,13 +166,13 @@ Item {
target: circle1 target: circle1
property: "color" property: "color"
to: Theme.accentColor to: Theme.accentColor
duration: 500 duration: 400
} }
PropertyAnimation { PropertyAnimation {
target: circle0 target: circle0
property: "color" property: "color"
to: Theme.backgroundAccentColor to: Theme.backgroundAccentColor
duration: 500 duration: 400
} }
} }
...@@ -170,13 +181,13 @@ Item { ...@@ -170,13 +181,13 @@ Item {
target: circle2 target: circle2
property: "color" property: "color"
to: Theme.accentColor to: Theme.accentColor
duration: 500 duration: 400
} }
PropertyAnimation { PropertyAnimation {
target: circle1 target: circle1
property: "color" property: "color"
to: Theme.backgroundAccentColor to: Theme.backgroundAccentColor
duration: 500 duration: 400
} }
} }
...@@ -185,13 +196,13 @@ Item { ...@@ -185,13 +196,13 @@ Item {
target: circle3 target: circle3
property: "color" property: "color"
to: Theme.accentColor to: Theme.accentColor
duration: 500 duration: 400
} }
PropertyAnimation { PropertyAnimation {
target: circle2 target: circle2
property: "color" property: "color"
to: Theme.backgroundAccentColor to: Theme.backgroundAccentColor
duration: 500 duration: 400
} }
} }
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment