1
0
mirror of https://gitlab.com/kelteseth/ScreenPlay.git synced 2024-11-07 03:22:33 +01:00

Fix background vars

This commit is contained in:
Elias 2018-12-04 18:27:19 +01:00
parent 062d6d6f71
commit 9a8f2334ea

View File

@ -7,13 +7,19 @@ Item {
id: element id: element
anchors.fill: parent anchors.fill: parent
state: "init" state: "init"
onStateChanged: print(state) onStateChanged: {
if (state === "init") {
colorShaderCreateTimer.stop()
} else {
colorShaderCreateTimer.start()
}
}
property var myDate: new Date() property var myDate: new Date()
Timer { Timer {
id: colorShaderCreateTimer
interval: 16 interval: 16
running: true
repeat: true repeat: true
onTriggered: colorShaderCreate.time = myDate.getMilliseconds() onTriggered: colorShaderCreate.time = myDate.getMilliseconds()
} }
@ -50,25 +56,22 @@ Item {
Transition { Transition {
from: "init" from: "init"
to: "create" to: "create"
reversible: true
PropertyAnimation { PropertyAnimation {
target: colorShaderCreateWrapper target: colorShaderCreate
property: "shaderOpacity" property: "shaderOpacity"
duration: 200 duration: 400
easing.type: Easing.InOutQuad easing.type: Easing.OutQuart
} }
}, },
Transition { Transition {
from: "create" from: "create"
to: "*" to: "*"
reversible: true
PropertyAnimation { PropertyAnimation {
target: colorShaderCreateWrapper target: colorShaderCreate
property: "shaderOpacity" property: "shaderOpacity"
duration: 50 duration: 0
easing.type: Easing.InOutQuad
} }
} }
] ]