diff options
| author | srdusr <[email protected]> | 2026-07-07 23:32:00 +0200 |
|---|---|---|
| committer | srdusr <[email protected]> | 2026-07-07 23:32:00 +0200 |
| commit | a6f98eba60f71f7250f4383e76642a901c5b8439 (patch) | |
| tree | cf85acae377514cc8e14751347b4b19655884a1a /crates/macos | |
| parent | ad5a7349d28ad52032fff6885e2d8b80ea28dbce (diff) | |
| download | srdwm-a6f98eba60f71f7250f4383e76642a901c5b8439.tar.gz srdwm-a6f98eba60f71f7250f4383e76642a901c5b8439.zip | |
Lock screen: show each key's alternate character, use a UI font, space the dots
Three reports, three separate causes.
Alternate characters were invisible. A keycap drew only the character the
current shift state types, so there was no way to find a symbol without
pressing Shift and hunting for it - a physical key is labelled with both.
Each cap now draws the other state's character small and dimmed in its
top-right, skipped where the two are the same (every letter differs only by
case, which the cap already shows) and for named keys like Enter.
"Enter Password" rendered in a monospace font. find_system_font
deliberately prefers a mono face, which is right for a titlebar title or a
menu row sitting in columns and wrong for a sentence; on this machine it
resolves to DejaVu Sans Mono. New find_ui_font prefers a proportional face
from a ranked list of widely-installed families, falling back to the mono
one, and the lock screen's prose - prompt, clock, date, username, status --
uses it. Ranked rather than first-found so the result does not depend on
directory order, which is how the mono scan once picked an italic face and
rendered every titlebar in italic.
The password dots had no spacing. They were drawn as a plain string, so a
run of identical bullets separated only by their own advance read as one
smeared blob rather than countable characters. Added explicit tracking,
excluded from the centring width so the row does not sit half a gap left.
531 tests pass, clippy clean.
Diffstat (limited to 'crates/macos')
0 files changed, 0 insertions, 0 deletions