on xenial help sign in
update as per design review
commit034e6781284c1ba8dc0414e1b7548f3e4c045cd8 authorMichael Zanetti <michael.zanetti@canonical.com> dateTue 19 Aug 2014, 20:06 (12 years ago) parent9a26bac
5 files changed+12−10
qml/Components/Lockscreen.qml−1 qml/Components/PinLockscreen.qml+1 qml/Shell.qml+2−2 tests/qmltests/Greeter/tst_Lockscreen.qml+7−5 tests/qmltests/tst_ShellWithPin.qml+2−2
qml/Components/Lockscreen.qml−1
@@ -206,7 +206,6 @@ Showable {
206206 text: i18n.tr("Emergency Call")
207207 color: "#f3f3e7"
208208 opacity: 0.6
209− fontSize: "small"
210209 }
211210
212211 MouseArea {
qml/Components/PinLockscreen.qml+1
@@ -208,6 +208,7 @@ Column {
208208 height: numbersGrid.buttonHeight
209209 width: numbersGrid.buttonWidth
210210 enabled: root.enabled && pinentryField.text.length >= root.minPinLength
211+ visible: root.minPinLength == -1 || root.minPinLength !== root.maxPinLength
211212
212213 onClicked: root.entered(pinentryField.text)
213214 }
qml/Shell.qml+2−2
@@ -266,8 +266,8 @@ Item {
266266 lockscreen.infoText = i18n.tr("Enter your passphrase")
267267 lockscreen.errorText = i18n.tr("Sorry, incorrect passphrase")
268268 } else {
269− lockscreen.infoText = i18n.tr("Enter your passcode")
270− lockscreen.errorText = i18n.tr("Sorry, incorrect passcode")
269+ lockscreen.infoText = i18n.tr("Enter your PIN")
270+ lockscreen.errorText = i18n.tr("Sorry, incorrect PIN")
271271 }
272272 } else {
273273 lockscreen.infoText = i18n.tr("Enter your %1").arg(text.toLowerCase())
tests/qmltests/Greeter/tst_Lockscreen.qml+7−5
@@ -374,16 +374,18 @@ Rectangle {
374374
375375 function test_minMaxLength(data) {
376376 pinPadCheckBox.checked = false
377− minPinLengthTextField.text = data.minPinLength
378− maxPinLengthTextField.text = data.maxPinLength
377+ minPinLengthTextField.text = data.minPinLength;
378+ maxPinLengthTextField.text = data.maxPinLength;
379379 waitForLockscreenReady();
380380
381381 var pinPadButton5 = findChild(lockscreen, "pinPadButton5");
382382 var backspaceButton = findChild(lockscreen, "backspaceIcon");
383383 var confirmButton = findChild(lockscreen, "confirmButton");
384− var inputField = findChild(lockscreen, "pinentryField")
384+ var inputField = findChild(lockscreen, "pinentryField");
385+
386+ tryCompare(backspaceButton, "opacity", 0);
385387
386− tryCompare(backspaceButton, "opacity", 0)
388+ tryCompare(confirmButton, "visible", (data.minPinLength != data.maxPinLength) || (data.minPinLength == -1));
387389
388390 for (var i = 0; i < 10; i++) {
389391 mouseClick(pinPadButton5, units.gu(1), units.gu(1));
@@ -419,7 +421,7 @@ Rectangle {
419421
420422 function test_retryDisplay_data() {
421423 return [
422− {tag: "empty", retryText: ""},
424+ {tag: "empty", retryText: " "},
423425 {tag: "3 retries left", retryText: "3 retries left"},
424426 ]
425427 }
tests/qmltests/tst_ShellWithPin.qml+2−2
@@ -220,10 +220,10 @@ Item {
220220 tryCompare(placeHolder, "text", "")
221221
222222 enterPin("1111")
223− tryCompare(placeHolder, "text", "Sorry, incorrect passcode")
223+ tryCompare(placeHolder, "text", "Sorry, incorrect PIN")
224224
225225 enterPin("1111")
226− tryCompare(placeHolder, "text", "Sorry, incorrect passcode")
226+ tryCompare(placeHolder, "text", "Sorry, incorrect PIN")
227227
228228 enterPin("1111")
229229 tryCompare(placeHolder, "text", "Too many incorrect attempts")