[SDDM Theme] Select all and focus password field on error

When logging in failed, focus the password field and select all, so you can start typing a new password thereafter.
I did the same in the lock screen.

There's a workaround for a bug which draws focus away from the password field on login
but never put it back if logging in failed.

Differential Revision: https://phabricator.kde.org/D2767
wilder-5.14
Kai Uwe Broulik 10 years ago
parent 77c61f5cac
commit 88e34394bd
  1. 8
      sddm-theme/Login.qml

@ -62,6 +62,14 @@ SessionManagementScreen {
event.accepted = true
}
}
Connections {
target: sddm
onLoginFailed: {
passwordBox.selectAll()
passwordBox.forceActiveFocus()
}
}
}
PlasmaComponents.Button {
id: loginButton

Loading…
Cancel
Save