on xenial help sign in
improve the pin lockscreen

On smallish screens, like the BQ E4.5, it frequently happens that one misses a digit when quickly entering the pin. After a while of debugging usage on my phone I noticed that the cause of this is actually that the user keeps moving the finger while touching the buttons and so it often happens that the touch events are not recognized as clicks. I've been using this patch for a while now and it increased the reliability of the pin entry a lot. I've also asked other people who reported the issue to test this and feedback has been rather good.

commitd25b51998e26f7412b6d174ac8d220602a5e79fd authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 12 Apr 2016, 14:33 (11 years ago) parent3892902
1 file changed+10−5
qml/Components/PinLockscreen.qml+10−5
qml/Components/PinLockscreen.qml+10−5
@@ -144,12 +144,13 @@ FocusScope {
144144
145145 AbstractButton {
146146 objectName: "backspaceIcon"
147− anchors { right: parent.right; top: parent.top; bottom: parent.bottom }
147+ anchors { right: parent.right; top: parent.top; bottom: parent.bottom; margins: -units.gu(1) }
148148 width: height
149149 enabled: root.entryEnabled
150150
151151 Icon {
152152 anchors.fill: parent
153+ anchors.margins: units.gu(1)
153154 name: "erase"
154155 color: root.foregroundColor
155156 }
@@ -196,8 +197,10 @@ FocusScope {
196197 pinentryField.text.length < root.maxPinLength ||
197198 pinentryField.incorrectOverride)
198199
199− onClicked: {
200− pinentryField.appendNumber(index + 1)
200+ onPressedChanged: {
201+ if (!pressed) {
202+ pinentryField.appendNumber(index + 1)
203+ }
201204 }
202205 }
203206 }
@@ -214,8 +217,10 @@ FocusScope {
214217 pinentryField.text.length < root.maxPinLength ||
215218 pinentryField.incorrectOverride)
216219
217− onClicked: {
218− pinentryField.appendNumber(0)
220+ onPressedChanged: {
221+ if (!pressed) {
222+ pinentryField.appendNumber(0)
223+ }
219224 }
220225 }
221226 Item {