From ae47a562bd423df856ec6c735d9e4c29a8e1e3c6 Mon Sep 17 00:00:00 2001 From: srdusr <99972264+srdusr@users.noreply.github.com> Date: Thu, 20 Nov 2025 17:10:00 +0200 Subject: 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). --- crates/wayland/src/winit/render.rs | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'crates/wayland/src/winit') diff --git a/crates/wayland/src/winit/render.rs b/crates/wayland/src/winit/render.rs index 03fff3d..a07e074 100644 --- a/crates/wayland/src/winit/render.rs +++ b/crates/wayland/src/winit/render.rs @@ -66,7 +66,19 @@ impl WaylandPlatform { let name = self.output.name(); let bg = self.state.native_lock_background(&name).cloned(); let ui = self.state.native_lock_ui().map(|(buf, s)| (buf.clone(), s)); - let elements = crate::native_lock::native_lock_render_elements(bg.as_ref(), ui.as_ref().map(|(b, s)| (b, *s)), (size.w, size.h), renderer); + let header = self.state.native_lock_header().map(|(buf, s)| (buf.clone(), s)); + let shadow = self.state.native_lock_shadow().cloned(); + let keyboard = self.state.native_lock_keyboard().map(|(buf, s)| (buf.clone(), s)); + let shake_offset = self.state.native_lock_shake_offset(); + let frame = crate::native_lock::NativeLockFrame { + background: bg.as_ref(), + header: header.as_ref().map(|(b, s)| (b, *s)), + shadow: shadow.as_ref(), + ui: ui.as_ref().map(|(b, s)| (b, *s)), + keyboard: keyboard.as_ref().map(|(b, s)| (b, *s)), + shake_offset, + }; + let elements = crate::native_lock::native_lock_render_elements(frame, (size.w, size.h), renderer); self.damage_tracker .render_output(renderer, &mut framebuffer, age, &elements, [0.0, 0.0, 0.0, 1.0]) .map_err(err)?; -- cgit v1.2.3