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.
This commit is contained in:
Aleix Pol 2021-10-16 17:31:42 +02:00 committed by Aleix Pol Gonzalez
parent 04e1cc1d58
commit 9a6e70f5c3
2 changed files with 5 additions and 1 deletions

View file

@ -114,6 +114,7 @@ Rectangle {
password: root.password
previewCharIndex: -2
pinLabel: qsTr("Enter PIN")
onPasswordChanged: keypadRoot.passwordChanged()
onChangePassword: root.password = password
Binding {

View file

@ -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
}
}
}
}