UI: favorite themes and appearance shortcuts

Port of storytold/photocraft#2445. Each theme in the appearance picker gets a
star at the right edge of its row. Starred themes are saved with the
preferences and listed in a right-click menu on the header's appearance button,
next to Appearance Settings, so switching between favorites takes one click.
This commit is contained in:
Luniiya
2026-10-11 15:46:18 +02:00
parent 9a7d3e7699
commit e1bcaab0a0
8 changed files with 176 additions and 7 deletions
+12
View File
@@ -81,6 +81,9 @@ pub(crate) fn tr_args(text: &str, args: &[&dyn Display]) -> String {
/// Japanese: the same rows, in the same order, as the Chinese catalogs below (the tests keep the two in step).
const JAPANESE: &[(&str, &str)] = &[
("Appearance Settings…", "外観設定…"),
("Add to favorites", "お気に入りに追加"),
("Remove from favorites", "お気に入りから削除"),
(" OK ", " OK "),
(" Delete ", " 削除 "),
(" Open Auto-Save ", " 自動保存を開く "),
@@ -511,6 +514,9 @@ const JAPANESE: &[(&str, &str)] = &[
];
const SIMPLIFIED_CHINESE: &[(&str, &str)] = &[
("Appearance Settings…", "外观设置…"),
("Add to favorites", "添加到收藏"),
("Remove from favorites", "从收藏中移除"),
(" OK ", " 确定 "),
(" Delete ", " 删除 "),
(" Open Auto-Save ", " 打开自动保存 "),
@@ -1036,6 +1042,9 @@ const SIMPLIFIED_CHINESE: &[(&str, &str)] = &[
];
const TRADITIONAL_CHINESE: &[(&str, &str)] = &[
("Appearance Settings…", "外觀設定…"),
("Add to favorites", "加入最愛"),
("Remove from favorites", "從最愛移除"),
(" OK ", " 確定 "),
(" Delete ", " 刪除 "),
(" Open Auto-Save ", " 開啟自動儲存 "),
@@ -1558,6 +1567,9 @@ const TRADITIONAL_CHINESE: &[(&str, &str)] = &[
/// Ukrainian (uk): original translations of the same interface rows as the Chinese catalogs.
/// Technical names, key names and substituted project content keep their original spelling.
const UKRAINIAN: &[(&str, &str)] = &[
("Appearance Settings…", "Налаштування вигляду…"),
("Add to favorites", "Додати до вибраного"),
("Remove from favorites", "Видалити з вибраного"),
(" OK ", " Гаразд "),
(" Delete ", " Видалити "),
(" Open Auto-Save ", " Відкрити автозбереження "),