summaryrefslogtreecommitdiffstats
path: root/wayland/democompositor/qml/TimedButton.qml
diff options
context:
space:
mode:
authorPaul Olav Tvete <paul.tvete@theqtcompany.com>2015-11-30 13:49:53 +0100
committerPaul Olav Tvete <paul.tvete@theqtcompany.com>2016-02-09 11:26:36 +0000
commit19acec2796c26bd902472ddd87858fac4d20ada4 (patch)
treec11dc4d3e8067916bd1af3019ffbf62c60a8095d /wayland/democompositor/qml/TimedButton.qml
parent07f1279e26d4cce5206b9364407aafb312b47fce (diff)
Fade to black
Change-Id: Ib8cb64c1c3d84bf79e70bab3c353519f7daadd92 Reviewed-by: Eskil Abrahamsen Blomfeldt <eskil.abrahamsen-blomfeldt@theqtcompany.com>
Diffstat (limited to 'wayland/democompositor/qml/TimedButton.qml')
-rw-r--r--wayland/democompositor/qml/TimedButton.qml8
1 files changed, 7 insertions, 1 deletions
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: {