aboutsummaryrefslogtreecommitdiffstats
path: root/theme/Main.qml
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-09-17 14:28:41 +0200
committerDanilo M. <danix@danix.xyz>2026-09-17 14:28:41 +0200
commit8ead58fb5baa8d781159cf443c0f7ffd68cb6775 (patch)
tree83e64a459dd45e028b7073f1d5cc2dafcfd05252 /theme/Main.qml
parentcdcf62416feffcb81cb07fdfe2e2dc0320490829 (diff)
downloadsddm-theme-udt-8ead58fb5baa8d781159cf443c0f7ffd68cb6775.tar.gz
sddm-theme-udt-8ead58fb5baa8d781159cf443c0f7ffd68cb6775.zip
feat: replace the login card with a left panel
Draw the greeter as a full-height left panel with a clock, greeting, avatar, a staged username-then-password slot, a power row and the session selector at the bottom. Delete the centered login card.
Diffstat (limited to 'theme/Main.qml')
-rw-r--r--theme/Main.qml19
1 files changed, 14 insertions, 5 deletions
diff --git a/theme/Main.qml b/theme/Main.qml
index 63cb6ea..a5acac9 100644
--- a/theme/Main.qml
+++ b/theme/Main.qml
@@ -86,7 +86,7 @@ Item {
function wake() {
if (!root.uiVisible) {
root.uiVisible = true
- card.restoreFocus()
+ panel.restoreFocus()
}
idle.restart()
}
@@ -103,10 +103,19 @@ Item {
event.accepted = false
}
- LoginCard {
- id: card
- anchors.centerIn: parent
- anchors.horizontalCenterOffset: card.shakeOffset
+ // Panel width as a fraction of the window, with a sane fallback when the
+ // key is missing or malformed.
+ readonly property real panelWidth: {
+ var v = parseFloat(config.stringValue("panelWidth"))
+ return v > 0 ? v : 0.30
+ }
+
+ Panel {
+ id: panel
+ anchors.left: parent.left
+ anchors.top: parent.top
+ anchors.bottom: parent.bottom
+ width: parent.width * root.panelWidth
visible: root.cardScreen
enabled: root.uiVisible
opacity: root.uiVisible ? 1 : 0