diff options
author | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2015-11-30 13:49:53 +0100 |
---|---|---|
committer | Paul Olav Tvete <paul.tvete@theqtcompany.com> | 2016-02-09 11:26:36 +0000 |
commit | 19acec2796c26bd902472ddd87858fac4d20ada4 (patch) | |
tree | c11dc4d3e8067916bd1af3019ffbf62c60a8095d /wayland/democompositor/qml/Screen.qml | |
parent | 07f1279e26d4cce5206b9364407aafb312b47fce (diff) |
Fade to black
Change-Id: Ib8cb64c1c3d84bf79e70bab3c353519f7daadd92
Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'wayland/democompositor/qml/Screen.qml')
-rw-r--r-- | wayland/democompositor/qml/Screen.qml | 32 |
1 files changed, 28 insertions, 4 deletions
diff --git a/wayland/democompositor/qml/Screen.qml b/wayland/democompositor/qml/Screen.qml index 9ab3557..ca26683 100644 --- a/wayland/democompositor/qml/Screen.qml +++ b/wayland/democompositor/qml/Screen.qml @@ -62,6 +62,30 @@ WaylandOutput { id: launcher } + + Rectangle { + id: curtain + color: "black" + anchors.fill: parent + opacity: 0 + z: 100 + } + + SequentialAnimation { + id: quitAnimation + + PropertyAnimation { + target: curtain + property: "opacity" + duration: 500 + to: 1 + easing.type: Easing.InQuad + } + ScriptAction { + script: Qt.quit() + } + } + Rectangle { id: sidebar @@ -140,26 +164,26 @@ WaylandOutput { height: 30 width: sidebar.width - 10 text.text: "Launch wiggly" - executable: "/tmp/wiggly" + executable: "./wiggly" } LaunchButton { height: 30 width: sidebar.width - 10 text.text: "Launch analog clock" - executable: "/tmp/analogclock" + executable: "./analogclock" } LaunchButton { height: 30 width: sidebar.width - 10 text.text: "Launch digital clock" - executable: "/tmp/digitalclock" + executable: "./digitalclock" } TimedButton { //visible: false height: 50 width: sidebar.width - 10 text: "Quit" - onTriggered: Qt.quit() + onTriggered: quitAnimation.start() } } } |