@@ -17,7 +17,7 @@
1717import QtQuick 2.4
1818import Ubuntu.Components 1.3
1919
20−AbstractButton {
20+Item {
2121 id: root
2222 opacity: enabled ? 1 : 0.6
2323
@@ -25,6 +25,10 @@ AbstractButton {
2525 property string iconName
2626 property color foregroundColor: "#000000"
2727
28+ readonly property alias pressed: mouseArea.pressed
29+
30+ signal clicked();
31+
2832 UbuntuShape {
2933 anchors.fill: parent
3034 opacity: root.pressed ? 1 : 0
@@ -60,4 +64,17 @@ AbstractButton {
6064 UbuntuNumberAnimation { duration: UbuntuAnimation.SlowDuration }
6165 }
6266 }
67+
68+ MouseArea {
69+ id: mouseArea
70+ anchors.fill: parent
71+
72+ // Intentionally using onReleased here to increase the robustness against
73+ // sloppy presses. This often happens when entering a pin very quickly and
74+ // the numbers for the pin are far apart.
75+ onReleased: {
76+ Haptics.play();
77+ root.clicked();
78+ }
79+ }
6380}