From 9a6e70f5c39f305c87cf14fb33c1f6a0e609be1b Mon Sep 17 00:00:00 2001 From: Aleix Pol Date: Sat, 16 Oct 2021 17:31:42 +0200 Subject: [PATCH] LockScreen: Support entering the password from the physical keyboard, without flicking Always get the focus, if the password changes, ensure we show what's changing. --- look-and-feel/contents/lockscreen/Keypad.qml | 1 + look-and-feel/contents/lockscreen/LockScreen.qml | 5 ++++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/look-and-feel/contents/lockscreen/Keypad.qml b/look-and-feel/contents/lockscreen/Keypad.qml index d0336aae..4845716d 100644 --- a/look-and-feel/contents/lockscreen/Keypad.qml +++ b/look-and-feel/contents/lockscreen/Keypad.qml @@ -114,6 +114,7 @@ Rectangle { password: root.password previewCharIndex: -2 pinLabel: qsTr("Enter PIN") + onPasswordChanged: keypadRoot.passwordChanged() onChangePassword: root.password = password Binding { diff --git a/look-and-feel/contents/lockscreen/LockScreen.qml b/look-and-feel/contents/lockscreen/LockScreen.qml index 2dd553ad..fddfb99c 100644 --- a/look-and-feel/contents/lockscreen/LockScreen.qml +++ b/look-and-feel/contents/lockscreen/LockScreen.qml @@ -278,9 +278,12 @@ PlasmaCore.ColorScope { Keypad { id: keypad - focus: passwordFlickable.contentY === passwordFlickable.columnHeight + focus: true swipeProgress: passwordFlickable.contentY / passwordFlickable.columnHeight Layout.fillWidth: true + onPasswordChanged: { + passwordFlickable.contentY = passwordFlickable.contentHeight - passwordFlickable.height + } } } }