srdusr
aboutsummaryrefslogtreecommitdiffstats
path: root/crates/core/src
diff options
context:
space:
mode:
authorsrdusr <[email protected]>2025-11-20 17:10:00 +0200
committersrdusr <[email protected]>2025-11-20 17:10:00 +0200
commitae47a562bd423df856ec6c735d9e4c29a8e1e3c6 (patch)
tree6fa732650b8809d0c302017fbc72254c66bccc02 /crates/core/src
parent04466601f4714dcbc1f3b0ef134febede6febb6a (diff)
downloadsrdwm-ae47a562bd423df856ec6c735d9e4c29a8e1e3c6.tar.gz
srdwm-ae47a562bd423df856ec6c735d9e4c29a8e1e3c6.zip
Redesign the native lock screen: clock/avatar header, on-screen keyboard, wrong-password shake
The native lock UI was a flat bordered rectangle with three left-aligned text lines and no shadow, clock, or identity marker - reported directly as looking unfinished. Splits the redesign across a new transparent-canvas header (time, date, circular avatar, username) above a redesigned, centered password box with a real drop shadow and a dimmed placeholder prompt, plus a genuine on-screen QWERTY-shaped keyboard with working Shift/Backspace/Return/Space and real click hit-testing shared with the render path via one `lock_stack_layout` function, and a damped-sine shake on a failed attempt. LockConfig gains show_clock/show_keyboard/avatar_bg, each independently srd.set-able and documented in a new theme.lock.* section in DEFAULTS.md. native_lock_render_elements now takes one NativeLockFrame struct instead of positional buffer arguments now that it composites five optional layers instead of two. Full workspace build/test/clippy clean (152 wayland tests, +6 new).
Diffstat (limited to 'crates/core/src')
-rw-r--r--crates/core/src/lock_config.rs22
1 files changed, 22 insertions, 0 deletions
diff --git a/crates/core/src/lock_config.rs b/crates/core/src/lock_config.rs
index 7edeeb5..92ba0d0 100644
--- a/crates/core/src/lock_config.rs
+++ b/crates/core/src/lock_config.rs
@@ -34,6 +34,25 @@ pub struct LockConfig {
pub show_caps_lock: bool,
pub show_failed_attempts: bool,
pub fail_message: String,
+ /// A large time+date readout above the password box, plus a circular
+ /// initial-letter avatar and the username - the set of things every
+ /// mainstream lock screen (GNOME, macOS, Windows) shows and this one
+ /// didn't, reported live as the box on its own "looks ugly/AI-like".
+ /// `true` by default; `false` reduces the lock screen to just the
+ /// password box, the previous look, for anyone who'd rather not have
+ /// the time visible on a locked screen.
+ pub show_clock: bool,
+ /// An on-screen keyboard below the password box, for a session with no
+ /// physical keyboard reachable (a touchscreen device, primarily) --
+ /// see `native_lock.rs`'s own `render_keyboard`/`keyboard_hit_test`.
+ /// `true` by default; a real physical keyboard still works identically
+ /// either way, so this only ever adds a second input method, never
+ /// removes the first.
+ pub show_keyboard: bool,
+ /// The avatar circle's fill colour - defaults to `box_border` (the
+ /// same accent every other lock-screen element already uses) rather
+ /// than a third independent colour to keep track of.
+ pub avatar_bg: (u8, u8, u8),
}
impl Default for LockConfig {
@@ -49,6 +68,9 @@ impl Default for LockConfig {
show_caps_lock: true,
show_failed_attempts: true,
fail_message: "Wrong password".to_string(),
+ show_clock: true,
+ show_keyboard: true,
+ avatar_bg: (0x88, 0xc0, 0xd0), // Nord blue, matches box_border
}
}
}