anchors.bottom: parent.bottom
anchors.left: parent.left
anchors.right: parent.right
- visible: controlsVisible
+ visible: true
+ opacity: 1
function toggleVisible() {
controlsVisible = !controlsVisible;
}
+
+ states: [
+ State {
+ name: "invisible"
+ when: !controlsVisible
+ PropertyChanges {
+ target: controls
+ opacity: 0
+ }
+ }
+ ]
+
+ transitions: [
+ Transition {
+ to: "invisible"
+ SequentialAnimation {
+ NumberAnimation {
+ property: "opacity"
+ easing.type: Easing.InOutQuad
+ duration: 500
+ }
+ ScriptAction {
+ script: controls.visible = false
+ }
+ }
+ },
+ Transition {
+ from: "invisible"
+ SequentialAnimation {
+ ScriptAction {
+ script: controls.visible = true
+ }
+ NumberAnimation {
+ property: "opacity"
+ easing.type: Easing.InOutQuad
+ duration: 500
+ }
+ }
+ }
+
+ ]
}
TextWithBackground {