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:
parent
bf194777c0
commit
9bdfa5fe55
@ -178,7 +178,16 @@ Item {
|
|||||||
|
|
||||||
states: [
|
states: [
|
||||||
State { name: "normal" },
|
State { name: "normal" },
|
||||||
State { name: "pressed" }
|
State { name: "pressed"
|
||||||
|
PropertyChanges {
|
||||||
|
target: surfaceNormal
|
||||||
|
opacity: 0
|
||||||
|
}
|
||||||
|
PropertyChanges {
|
||||||
|
target: surfacePressed
|
||||||
|
opacity: 1
|
||||||
|
}
|
||||||
|
}
|
||||||
]
|
]
|
||||||
transitions: [
|
transitions: [
|
||||||
Transition {
|
Transition {
|
||||||
@ -188,14 +197,6 @@ Item {
|
|||||||
NumberAnimation { target: surfaceNormal; property: "opacity"; to: 1; duration: 100 }
|
NumberAnimation { target: surfaceNormal; property: "opacity"; to: 1; duration: 100 }
|
||||||
NumberAnimation { target: surfacePressed; property: "opacity"; to: 0; 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 }
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user