summaryrefslogtreecommitdiffstats
path: root/wayland
diff options
context:
space:
mode:
Diffstat (limited to 'wayland')
-rw-r--r--wayland/democompositor/qml/Screen.qml32
-rw-r--r--wayland/democompositor/qml/TimedButton.qml8
2 files changed, 35 insertions, 5 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()
}
}
}
diff --git a/wayland/democompositor/qml/TimedButton.qml b/wayland/democompositor/qml/TimedButton.qml
index 012875a..2134e4d 100644
--- a/wayland/democompositor/qml/TimedButton.qml
+++ b/wayland/democompositor/qml/TimedButton.qml
@@ -54,7 +54,11 @@ Rectangle {
},
State {
name: "PRESSED"
+ },
+ State {
+ name: "TRIGGERED"
}
+
]
transitions: [ Transition {
@@ -111,8 +115,10 @@ Rectangle {
onReleased: {
if (containsMouse && parent.percent >= 100) {
parent.triggered()
+ parent.state = "TRIGGERED"
+ } else {
+ parent.state = "UNPRESSED"
}
- parent.state = "UNPRESSED"
}
onPositionChanged: {