Commit ccefa20a authored by Krešimir Čohar's avatar Krešimir Čohar

[sddm-theme] Add buttons to username prompt to make it a full-fledged login screen alternative

This patch adds the buttons Suspend, Restart, and Shut Down to the username prompt screen that appears once the Type User button is clicked so the user is able to suspend/restart/shut down from that screen without having to return to the initial login screen.
It also replaces the "Back" button with "List Users" (and an appropriate icon) on account of the latter being a more accurate description of what the screen goes back to once the button is clicked (and in case of future improvements, enables it to become a standalone login screen as well).

Test Plan:
Before: {F6605023}
After: {F6605026}

Reviewers: #vdg, #plasma, filipf, davidedmundson, ngraham

Reviewed By: #vdg, #plasma, filipf, davidedmundson, ngraham

Subscribers: abetts, davidedmundson, ngraham, filipf, plasma-devel

Tags: #plasma

Differential Revision:
parent 0123a53d
......@@ -347,9 +347,31 @@ PlasmaCore.ColorScope {
actionItems: [
ActionButton {
iconSource: "go-previous"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Back")
iconSource: "system-suspend"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Suspend")
onClicked: sddm.suspend()
enabled: sddm.canSuspend
visible: !inputPanel.keyboardActive
ActionButton {
iconSource: "system-reboot"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Restart")
onClicked: sddm.reboot()
enabled: sddm.canReboot
visible: !inputPanel.keyboardActive
ActionButton {
iconSource: "system-shutdown"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","Shut Down")
onClicked: sddm.powerOff()
enabled: sddm.canPowerOff
visible: !inputPanel.keyboardActive
ActionButton {
iconSource: "system-switch-user"
text: i18nd("plasma_lookandfeel_org.kde.lookandfeel","List Users")
onClicked: mainStack.pop()
visible: !inputPanel.keyboardActive
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment