diff options
| author | Danilo M. <danix@danix.xyz> | 2026-09-17 14:37:07 +0200 |
|---|---|---|
| committer | Danilo M. <danix@danix.xyz> | 2026-09-17 14:37:07 +0200 |
| commit | 27ef16187a672acb96e8d930e0ab4bf893ad8f6a (patch) | |
| tree | 9ce5a7b3c697bf267db0569101b22dca2283ffe9 /theme/components | |
| parent | 8ead58fb5baa8d781159cf443c0f7ffd68cb6775 (diff) | |
| download | sddm-theme-udt-27ef16187a672acb96e8d930e0ab4bf893ad8f6a.tar.gz sddm-theme-udt-27ef16187a672acb96e8d930e0ab4bf893ad8f6a.zip | |
fix: quote dateFormat and gate hidden credential field focus
Quote the comma-bearing dateFormat default; QSettings reads an
unquoted comma as a QStringList and SDDM's stringValue() then returns
the empty string, leaving the value inert. Note the caveat in the
README Panel section.
Set activeFocusOnTab per credential stage so Tab cannot reach the
offscreen, transparent field and silently append to the submitted
value. forceActiveFocus() ignores activeFocusOnTab, so focusStage()
still lands focus in each stage.
Apply the remaining review fixes: compare the PowerBar fallback as a
string, animate the back chevron width, give both opacity behaviours
an OutCubic easing, gate the clock timer on panel visibility, clamp
panelWidth to 1, and reword stale "card" prose to "panel".
Diffstat (limited to 'theme/components')
| -rw-r--r-- | theme/components/Backdrop.qml | 8 | ||||
| -rw-r--r-- | theme/components/Credentials.qml | 7 | ||||
| -rw-r--r-- | theme/components/Panel.qml | 2 | ||||
| -rw-r--r-- | theme/components/PowerBar.qml | 2 |
4 files changed, 11 insertions, 8 deletions
diff --git a/theme/components/Backdrop.qml b/theme/components/Backdrop.qml index c13b766..de39bc2 100644 --- a/theme/components/Backdrop.qml +++ b/theme/components/Backdrop.qml @@ -1,9 +1,9 @@ // SPDX-License-Identifier: GPL-2.0-only // Copyright (C) 2026 Danilo M. <danix@danix.xyz> // -// A frosted panel. It snapshots the wallpaper image the card sits on, blurs it -// and masks it to the card's rounded rect, then tints it for text contrast. -// When there is no source, only the tint draws, so the card still reads. +// A frosted panel. It snapshots the wallpaper image the panel sits on, blurs it +// and masks it to the panel's rounded rect, then tints it for text contrast. +// When there is no source, only the tint draws, so the panel still reads. import QtQuick import QtQuick.Effects @@ -25,7 +25,7 @@ Item { if (backdrop.sourceItem === null) return Qt.rect(0, 0, 0, 0) // Guard reads: mapToItem() hides its reads in C++, so the binding - // would not otherwise re-run when the card or image moves (e.g. + // would not otherwise re-run when the panel or image moves (e.g. // the failed-login shake). Reading the coordinates registers them. var _guard = backdrop.x + backdrop.y + backdrop.parent.x + backdrop.parent.y + backdrop.sourceItem.x + backdrop.sourceItem.y diff --git a/theme/components/Credentials.qml b/theme/components/Credentials.qml index c2aba29..2bfbaf5 100644 --- a/theme/components/Credentials.qml +++ b/theme/components/Credentials.qml @@ -56,6 +56,7 @@ Item { height: 44 clip: true visible: width > 0 + Behavior on width { NumberAnimation { duration: 220; easing.type: Easing.OutCubic } } Rectangle { anchors.fill: parent @@ -122,6 +123,7 @@ Item { height: slot.height text: userModel.lastUser !== undefined ? userModel.lastUser : "" placeholderText: "Username" + activeFocusOnTab: !creds.passwordStage font.family: "Noto Sans" color: config.stringValue("text") palette.base: config.stringValue("surface0") @@ -135,7 +137,7 @@ Item { x: creds.passwordStage ? -slot.width : 0 opacity: creds.passwordStage ? 0 : 1 Behavior on x { NumberAnimation { duration: 220; easing.type: Easing.OutCubic } } - Behavior on opacity { NumberAnimation { duration: 220 } } + Behavior on opacity { NumberAnimation { duration: 220; easing.type: Easing.OutCubic } } onAccepted: creds.confirm() onTextChanged: creds.wake() Keys.onPressed: event => { @@ -150,6 +152,7 @@ Item { height: slot.height echoMode: TextInput.Password placeholderText: "Password" + activeFocusOnTab: creds.passwordStage font.family: "Noto Sans" color: config.stringValue("text") palette.base: config.stringValue("surface0") @@ -163,7 +166,7 @@ Item { x: creds.passwordStage ? 0 : slot.width opacity: creds.passwordStage ? 1 : 0 Behavior on x { NumberAnimation { duration: 220; easing.type: Easing.OutCubic } } - Behavior on opacity { NumberAnimation { duration: 220 } } + Behavior on opacity { NumberAnimation { duration: 220; easing.type: Easing.OutCubic } } onAccepted: creds.confirm() Keys.onPressed: event => { creds.wake() diff --git a/theme/components/Panel.qml b/theme/components/Panel.qml index 4df989b..eac2c58 100644 --- a/theme/components/Panel.qml +++ b/theme/components/Panel.qml @@ -36,7 +36,7 @@ Item { property date now: new Date() Timer { interval: 1000 - running: true + running: panel.visible repeat: true onTriggered: panel.now = new Date() } diff --git a/theme/components/PowerBar.qml b/theme/components/PowerBar.qml index 1ce3e76..3d6b2c5 100644 --- a/theme/components/PowerBar.qml +++ b/theme/components/PowerBar.qml @@ -49,7 +49,7 @@ Row { source: modelData.icon !== "" ? modelData.icon : modelData.fallback visible: false onStatusChanged: { - if (status === Image.Error && source !== modelData.fallback) + if (status === Image.Error && String(source) !== modelData.fallback) source = modelData.fallback } } |
