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:
13 files changed
+749
-7
No files matched your search
@@ -4407,3 +4407,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 "Граница"
|
||||
Reference in new issue
Block a user