feat: state platform metrics and chrome in theme

This commit is contained in:
2026-11-07 14:13:15 +07:00
parent 9e378ff7ff
commit d696b1e707
12 changed files with 574 additions and 73 deletions
+9 -3
View File
@@ -229,6 +229,10 @@ density is frozen at a macOS-ish tuning.
## Recommended changes, in priority order
Landed 2026-11 with two deviations: Omarchy is grouped with GNOME (it
styles its apps with adwaita), and macOS's titlebar is stated at the
measured 32pt rather than queried at runtime (28pt on older builds).
1. **State `control_height` per platform** — add `control_height:
Option<Pixels>` beside `input_height` on `SystemTheme`, reuse the
ratio-scaling pattern: macOS 24 (measured), Windows 32, GNOME ≈34, KDE
@@ -248,9 +252,11 @@ density is frozen at a macOS-ish tuning.
queried rather than a drifted floor (32 on current builds, 28 older);
Windows stays stated.
6. **Add a minimal spacing scale to `Theme`** driven by a per-platform base
unit (GNOME 6, KDE 4/6/8, others 4); route menu/popover paddings, menu
item min-height (GNOME 32), and the hardcoded `min_w_`/`max_w` values
through it.
unit (GNOME 6, KDE 4/6/8, others 4); route menu/popover paddings and menu
row min-heights through it — GNOME 32 (published), Windows ≈33 (padding
4/5 + a 20px Body line + 2px item margins), KDE ≈29 (max(font, 20px
floors) + 1 + 2×4); the hardcoded `min_w_`/`max_w` surface values stay
put — they are platform-invariant.
7. **Calibrate switches and icons per platform** — macOS 54×24, Windows
40×20 with 12px knob, KDE 36×18; icon 16 on macOS/Windows.