diff --git a/sddm-theme/Login.qml b/sddm-theme/Login.qml --- a/lookandfeel/sddm-theme/Login.qml +++ b/lookandfeel/sddm-theme/Login.qml @@ -12,6 +12,8 @@ SessionManagementScreen { property string lastUserName + property alias username: userNameInput.text + //the y position that should be ensured visible when the on screen keyboard is visible property int visibleBoundary: mapFromItem(loginButton, 0, 0).y onHeightChanged: visibleBoundary = mapFromItem(loginButton, 0, 0).y + loginButton.height + units.smallSpacing diff --git a/sddm-theme/Main.qml b/sddm-theme/Main.qml --- a/lookandfeel/sddm-theme/Main.qml +++ b/lookandfeel/sddm-theme/Main.qml @@ -528,6 +528,13 @@ PlasmaCore.ColorScope { Connections { target: sddm + function onUserChange() { + userListComponent.username = user + userListComponent.userListCurrentIndex = -1 + } + function onSessionChange() { + sessionButton.changeSession(session) + } function onLoginFailed() { notificationMessage = i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Login Failed") footer.enabled = true --- a/lookandfeel/sddm-theme/SessionButton.qml +++ b/lookandfeel/sddm-theme/SessionButton.qml @@ -15,6 +15,14 @@ PlasmaComponents.ToolButton { property int currentIndex: -1 + function changeSession(session) { + for (var i = 0; i < menu.count; i++) { + if (instantiator.objectAt(i).text === session) { + currentIndex = i + } + } + } + text: i18nd("plasma_lookandfeel_org.kde.lookandfeel", "Desktop Session: %1", instantiator.objectAt(currentIndex).text || "") visible: menu.count > 1