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

@@ -4383,3 +4383,60 @@ msgstr "ランダムなプレイリストを再生"
msgid "Open a random label"
msgstr "ランダムなレーベルを開く"
msgid "Start from current theme"
msgstr "現在のテーマから開始"
msgid "Copy the colors of the currently applied theme into the editor as a starting point."
msgstr "現在適用中のテーマの色を出発点としてエディターにコピーします。"
msgid "Use current colors"
msgstr "現在の色を使用"
msgid "Dark theme"
msgstr "ダークテーマ"
msgid "Set the overall light or dark polarity. Affects derived shades, borders and overlays."
msgstr "全体の明暗の極性を設定します。派生する陰影、境界線、オーバーレイに影響します。"
msgid "SURFACES"
msgstr "サーフェス"
msgid "Background"
msgstr "背景"
msgid "Surface"
msgstr "サーフェス"
msgid "Elevated"
msgstr "浮き出し"
msgid "TEXT"
msgstr "テキスト"
msgid "Text"
msgstr "テキスト"
msgid "Secondary text"
msgstr "セカンダリテキスト"
msgid "ACCENT"
msgstr "アクセント"
msgid "Accent"
msgstr "アクセント"
msgid "Danger"
msgstr "危険"
msgid "Warning"
msgstr "警告"
msgid "Success"
msgstr "成功"
msgid "OTHER"
msgstr "その他"
msgid "Border"
msgstr "境界線"