on xenial help sign in
provide the same scale animation when pressed
commit2d2a022e37cae7f5206a4f4993622885d537b666 authorLukáš Tinkl <lukas.tinkl@canonical.com> dateThu 7 Apr 2016, 14:40 (11 years ago) parent3075a18
1 file changed+11−1
qml/Notifications/NotificationButton.qml+11−1
qml/Notifications/NotificationButton.qml+11−1
@@ -33,6 +33,7 @@ Rectangle {
3333 signal clicked()
3434
3535 AbstractButton {
36+ id: button
3637 anchors.fill: root
3738 onClicked: root.clicked()
3839
@@ -47,11 +48,20 @@ Rectangle {
4748
4849 Icon {
4950 id: icon
50− height: parent.height / 3 * 2
51+ height: units.gu(3)
5152 width: height
5253 anchors.centerIn: parent
5354 color: "white"
5455 visible: !label.visible
5556 }
5657 }
58+
59+ transformOrigin: Item.Top
60+ scale: button.pressed ? 0.98 : 1.0
61+ Behavior on scale {
62+ ScaleAnimator {
63+ duration: UbuntuAnimation.SnapDuration
64+ easing.type: Easing.Linear
65+ }
66+ }
5767}