Remove animation when changing from normal to pressed state

This was too slow, and for a normal mouse click was too slow to actually be seen.
Releasing from pressed still animates to increase visual feedback.
This commit is contained in:
David Edmundson 2012-06-19 22:30:08 +01:00
parent bf194777c0
commit 9bdfa5fe55

View File

@ -178,7 +178,16 @@ Item {
states: [
State { name: "normal" },
State { name: "pressed" }
State { name: "pressed"
PropertyChanges {
target: surfaceNormal
opacity: 0
}
PropertyChanges {
target: surfacePressed
opacity: 1
}
}
]
transitions: [
Transition {
@ -188,14 +197,6 @@ Item {
NumberAnimation { target: surfaceNormal; property: "opacity"; to: 1; duration: 100 }
NumberAnimation { target: surfacePressed; property: "opacity"; to: 0; duration: 100 }
}
},
Transition {
to: "pressed"
// Cross fade from normal to pressed
ParallelAnimation {
NumberAnimation { target: surfaceNormal; property: "opacity"; to: 0; duration: 100 }
NumberAnimation { target: surfacePressed; property: "opacity"; to: 1; duration: 100 }
}
}
]