feat(ui): custom theme editor panel + controller + i18n

Wire the custom-theme editor end to end. In AppearanceSettings, when the
"Custom" theme is selected, show a "Start from current theme" button, a "Dark
theme" polarity toggle, and a grouped token grid (SURFACES / TEXT / ACCENT /
STATUS / OTHER) of 11 base tokens. Each token is a swatch that toggles an
inline ColorPicker; edits route through AppearanceState.custom-set-token
(drag) and custom-set-token-hex (hex commit).

The crate::custom_theme controller reads the base straight from the editor
swatch properties (the in-memory source of truth, no per-drag disk reads),
sets the touched field, re-derives via qbz_theme::theme_from_base, pushes the
palette live and persists. seed_from_current snapshots the live Theme global
into the base; toggle_dark flips polarity; set_token_hex parses in Rust (Slint
cannot). main.rs registers the four callbacks.

Also harden the ColorPicker reseed guard: skip decompose when the fed-back
value equals our own emitted color, so a drag ending at v=0/s=0 no longer
resets the hue. New strings added to all 7 gettext catalogs (es Mexican/
neutral); msgfmt --check clean; full .slint tree validated via the slintcheck
stub.

cc
This commit is contained in:
vicrodh committed 2026-07-06 10:19:59 -06:00
1 parent 2001a40486
commit 1a7d33d9e0
13 files changed
+749 -7

No files matched your search

@@ -4394,3 +4394,60 @@ msgstr "Zufällige Playlist abspielen"
msgid "Open a random label"
msgstr "Zufälliges Label öffnen"
msgid "Start from current theme"
msgstr "Vom aktuellen Theme ausgehen"
msgid "Copy the colors of the currently applied theme into the editor as a starting point."
msgstr "Kopiert die Farben des aktuell angewendeten Themes als Ausgangspunkt in den Editor."
msgid "Use current colors"
msgstr "Aktuelle Farben verwenden"
msgid "Dark theme"
msgstr "Dunkles Theme"
msgid "Set the overall light or dark polarity. Affects derived shades, borders and overlays."
msgstr "Legt die generelle helle oder dunkle Polarität fest. Betrifft abgeleitete Schattierungen, Ränder und Overlays."
msgid "SURFACES"
msgstr "OBERFLÄCHEN"
msgid "Background"
msgstr "Hintergrund"
msgid "Surface"
msgstr "Oberfläche"
msgid "Elevated"
msgstr "Erhöht"
msgid "TEXT"
msgstr "TEXT"
msgid "Text"
msgstr "Text"
msgid "Secondary text"
msgstr "Sekundärer Text"
msgid "ACCENT"
msgstr "AKZENT"
msgid "Accent"
msgstr "Akzent"
msgid "Danger"
msgstr "Gefahr"
msgid "Warning"
msgstr "Warnung"
msgid "Success"
msgstr "Erfolg"
msgid "OTHER"
msgstr "SONSTIGES"
msgid "Border"
msgstr "Rand"