Skip to content

PhotoCraft: An open-source, photo editor written by scratch in pure Rust

feat(ui): Darken and Lighten Interface (Ctrl/Cmd+Shift+F1, F2) (#3709)

FinnNkc208e8ffc145
diff --git a/crates/ui-egui/src/i18n/cs.tsv b/crates/ui-egui/src/i18n/cs.tsv
index c256200fc..9b63b9633 100644
--- a/crates/ui-egui/src/i18n/cs.tsv
+++ b/crates/ui-egui/src/i18n/cs.tsv
@@ -3753,6 +3753,10 @@ navigator Zoom Zvětšení
Sent to {printer} Odesláno do {printer}
set in Print Settings… nastavuje se v nastavení tisku…
ICO is limited to 256 × 256 pixels ICO je omezen na 256 × 256 pixelů
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Ztmavit rozhraní
+ Lighten Interface Zesvětlit rozhraní
# Bevel & Emboss Technique.
Technique Technika
Chisel Hard Tvrdé tesání
diff --git a/crates/ui-egui/src/i18n/de.tsv b/crates/ui-egui/src/i18n/de.tsv
index 7e403a498..42bbbc993 100644
--- a/crates/ui-egui/src/i18n/de.tsv
+++ b/crates/ui-egui/src/i18n/de.tsv
@@ -3143,6 +3143,10 @@ curves Smooth Glätten
Sent to {printer} An {printer} gesendet
set in Print Settings… in den Druckeinstellungen festlegen…
ICO is limited to 256 × 256 pixels ICO ist auf 256 × 256 Pixel begrenzt
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Benutzeroberfläche abdunkeln
+ Lighten Interface Benutzeroberfläche aufhellen
# Bevel & Emboss Technique.
Technique Technik
Chisel Hard Meißeln hart
diff --git a/crates/ui-egui/src/i18n/el.tsv b/crates/ui-egui/src/i18n/el.tsv
index 0b53fe2b7..a7d6b6f87 100644
--- a/crates/ui-egui/src/i18n/el.tsv
+++ b/crates/ui-egui/src/i18n/el.tsv
@@ -3843,6 +3843,10 @@ curves Smooth Εξομάλυνση
Sent to {printer} Στάλθηκε στον {printer}
set in Print Settings… ορίζεται στις ρυθμίσεις εκτύπωσης…
ICO is limited to 256 × 256 pixels Το ICO περιορίζεται σε 256 × 256 εικονοστοιχεία
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Σκουρότερο περιβάλλον
+ Lighten Interface Φωτεινότερο περιβάλλον
# Bevel & Emboss Technique.
Technique Τεχνική
Chisel Hard Σκληρή σμίλευση
diff --git a/crates/ui-egui/src/i18n/es.tsv b/crates/ui-egui/src/i18n/es.tsv
index f3a9df7e2..3fa765518 100644
--- a/crates/ui-egui/src/i18n/es.tsv
+++ b/crates/ui-egui/src/i18n/es.tsv
@@ -2830,6 +2830,10 @@ curves Smooth Suavizar
Sent to {printer} Enviado a {printer}
set in Print Settings… se establece en Ajustes de impresión…
ICO is limited to 256 × 256 pixels ICO está limitado a 256 × 256 píxeles
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Oscurecer interfaz
+ Lighten Interface Aclarar interfaz
# Bevel & Emboss Technique.
Technique Técnica
Chisel Hard Cincelar duro
diff --git a/crates/ui-egui/src/i18n/fr.tsv b/crates/ui-egui/src/i18n/fr.tsv
index 8d54a8cdc..f1d11f19a 100644
--- a/crates/ui-egui/src/i18n/fr.tsv
+++ b/crates/ui-egui/src/i18n/fr.tsv
@@ -3147,6 +3147,10 @@ curves Smooth Lisser
Sent to {printer} Envoyé à {printer}
set in Print Settings… défini dans les paramètres d’impression…
ICO is limited to 256 × 256 pixels Le format ICO est limité à 256 × 256 pixels
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Assombrir l'interface
+ Lighten Interface Éclaircir l'interface
# Bevel & Emboss Technique.
Technique Technique
Chisel Hard Ciselage dur
diff --git a/crates/ui-egui/src/i18n/hu.tsv b/crates/ui-egui/src/i18n/hu.tsv
index 78a661346..e3f427921 100644
--- a/crates/ui-egui/src/i18n/hu.tsv
+++ b/crates/ui-egui/src/i18n/hu.tsv
@@ -4066,6 +4066,10 @@ cameraRaw Yellow Sárga
Ink Characteristics Festék jellemzői
Solidity: Fedőképesség:
Redrawing Újrarajzolás
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Felület sötétítése
+ Lighten Interface Felület világosítása
# Bevel & Emboss Technique.
Technique Technika
Chisel Hard Kemény vésés
diff --git a/crates/ui-egui/src/i18n/id.tsv b/crates/ui-egui/src/i18n/id.tsv
index 6497616c4..6b7aca6ff 100644
--- a/crates/ui-egui/src/i18n/id.tsv
+++ b/crates/ui-egui/src/i18n/id.tsv
@@ -3134,6 +3134,10 @@ curves Smooth Haluskan
Sent to {printer} Dikirim ke {printer}
set in Print Settings… diatur di Pengaturan Cetak…
ICO is limited to 256 × 256 pixels ICO dibatasi hingga 256 × 256 piksel
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Gelapkan Antarmuka
+ Lighten Interface Cerahkan Antarmuka
# Bevel & Emboss Technique.
Technique Teknik
Chisel Hard Pahat Keras
diff --git a/crates/ui-egui/src/i18n/it.tsv b/crates/ui-egui/src/i18n/it.tsv
index bea1a0867..06efc8d9f 100644
--- a/crates/ui-egui/src/i18n/it.tsv
+++ b/crates/ui-egui/src/i18n/it.tsv
@@ -4108,6 +4108,9 @@ navigator Zoom Zoom
Sent to {printer} Inviato a {printer}
set in Print Settings… impostato nelle impostazioni di stampa…
ICO is limited to 256 × 256 pixels ICO è limitato a 256 × 256 pixel
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Scurisci interfaccia
+ Lighten Interface Schiarisci interfaccia
# Bevel & Emboss Technique.
Technique Tecnica
Chisel Hard Cesello duro
diff --git a/crates/ui-egui/src/i18n/ja.tsv b/crates/ui-egui/src/i18n/ja.tsv
index 901549c75..7890c916f 100644
--- a/crates/ui-egui/src/i18n/ja.tsv
+++ b/crates/ui-egui/src/i18n/ja.tsv
@@ -3822,6 +3822,9 @@ curves Smooth スムーズ
Reset All Locked Settings ロックされた設定をすべて初期化
Copy Texture to Other Tools テクスチャを他のツールにコピー
ICO is limited to 256 × 256 pixels ICO は 256 × 256 ピクセルまでです
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface インターフェイスを暗くする
+ Lighten Interface インターフェイスを明るくする
# Bevel & Emboss Technique.
Technique テクニック
Chisel Hard チゼルハード
diff --git a/crates/ui-egui/src/i18n/ko.tsv b/crates/ui-egui/src/i18n/ko.tsv
index 79cc195b7..0ed7c3c67 100644
--- a/crates/ui-egui/src/i18n/ko.tsv
+++ b/crates/ui-egui/src/i18n/ko.tsv
@@ -3320,6 +3320,10 @@ curves Smooth 매끄럽게
Sent to {printer} {printer}(으)로 전송됨
set in Print Settings… 인쇄 설정에서 지정…
ICO is limited to 256 × 256 pixels ICO는 256 × 256픽셀로 제한됩니다
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface 인터페이스 어둡게
+ Lighten Interface 인터페이스 밝게
# Bevel & Emboss Technique.
Technique 기법
Chisel Hard 단단하게 조각
diff --git a/crates/ui-egui/src/i18n/nl.tsv b/crates/ui-egui/src/i18n/nl.tsv
index dce4d0920..0ea0ce047 100644
--- a/crates/ui-egui/src/i18n/nl.tsv
+++ b/crates/ui-egui/src/i18n/nl.tsv
@@ -3905,6 +3905,10 @@ curves Smooth Vloeiend maken
Sent to {printer} Verzonden naar {printer}
set in Print Settings… instellen in de afdrukinstellingen…
ICO is limited to 256 × 256 pixels ICO is beperkt tot 256 × 256 pixels
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Interface donkerder maken
+ Lighten Interface Interface lichter maken
# Bevel & Emboss Technique.
Technique Techniek
Chisel Hard Beitel hard
diff --git a/crates/ui-egui/src/i18n/pl.tsv b/crates/ui-egui/src/i18n/pl.tsv
index 9a8f77098..7d22a6ae7 100644
--- a/crates/ui-egui/src/i18n/pl.tsv
+++ b/crates/ui-egui/src/i18n/pl.tsv
@@ -3743,6 +3743,10 @@ curves Smooth Wygładź
Sent to {printer} Wysłano do {printer}
set in Print Settings… ustawiane w ustawieniach druku…
ICO is limited to 256 × 256 pixels ICO jest ograniczony do 256 × 256 pikseli
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Przyciemnij interfejs
+ Lighten Interface Rozjaśnij interfejs
# Bevel & Emboss Technique.
Technique Technika
Chisel Hard Dłuto twarde
diff --git a/crates/ui-egui/src/i18n/pt-br.tsv b/crates/ui-egui/src/i18n/pt-br.tsv
index f89e09eb0..a36fb9561 100644
--- a/crates/ui-egui/src/i18n/pt-br.tsv
+++ b/crates/ui-egui/src/i18n/pt-br.tsv
@@ -3935,6 +3935,10 @@ layerLabel No Color Sem cor
Sent to {printer} Enviado para {printer}
set in Print Settings… definido nas configurações de impressão…
ICO is limited to 256 × 256 pixels ICO é limitado a 256 × 256 pixels
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Escurecer interface
+ Lighten Interface Clarear interface
# Bevel & Emboss Technique.
Technique Técnica
Chisel Hard Cinzel duro
diff --git a/crates/ui-egui/src/i18n/ru.tsv b/crates/ui-egui/src/i18n/ru.tsv
index e32e5114b..3f7bd7524 100644
--- a/crates/ui-egui/src/i18n/ru.tsv
+++ b/crates/ui-egui/src/i18n/ru.tsv
@@ -3111,6 +3111,10 @@ curves Smooth Сгладить
Gray Value (Median) Уровень серого (медиана)
Integrated Density Интегральная плотность
Length Длина
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Сделать интерфейс темнее
+ Lighten Interface Сделать интерфейс светлее
# Bevel & Emboss Technique.
Technique Метод
Chisel Hard Жесткая огранка
diff --git a/crates/ui-egui/src/i18n/sr.tsv b/crates/ui-egui/src/i18n/sr.tsv
index 8365404d7..bdca95361 100644
--- a/crates/ui-egui/src/i18n/sr.tsv
+++ b/crates/ui-egui/src/i18n/sr.tsv
@@ -4219,6 +4219,10 @@ shape Appearance Izgled
Ink Characteristics Karakteristike mastila
Solidity: Punoća:
Redrawing Ponovno iscrtavanje
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Zatamni interfejs
+ Lighten Interface Posvetli interfejs
# Bevel & Emboss Technique.
Technique Tehnika
Chisel Hard Tvrdo klesanje
diff --git a/crates/ui-egui/src/i18n/tr.tsv b/crates/ui-egui/src/i18n/tr.tsv
index eaa32fcbb..4fcf00c6b 100644
--- a/crates/ui-egui/src/i18n/tr.tsv
+++ b/crates/ui-egui/src/i18n/tr.tsv
@@ -3877,6 +3877,10 @@ cameraData Lens Lens
Ink Characteristics Mürekkep Özellikleri
Solidity: Doluluk:
Redrawing Yeniden çiziliyor
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Arayüzü koyulaştır
+ Lighten Interface Arayüzü açıklaştır
# Bevel & Emboss Technique.
Technique Teknik
Chisel Hard Sert Keski
diff --git a/crates/ui-egui/src/i18n/uk.tsv b/crates/ui-egui/src/i18n/uk.tsv
index c6212c5d0..353e97c3b 100644
--- a/crates/ui-egui/src/i18n/uk.tsv
+++ b/crates/ui-egui/src/i18n/uk.tsv
@@ -3844,6 +3844,10 @@ curves Smooth Згладити
Sent to {printer} Надіслано на {printer}
set in Print Settings… задається в параметрах друку…
ICO is limited to 256 × 256 pixels ICO обмежено розміром 256 × 256 пікселів
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Зробити інтерфейс темнішим
+ Lighten Interface Зробити інтерфейс світлішим
# Bevel & Emboss Technique.
Technique Метод
Chisel Hard Жорстке різьблення
diff --git a/crates/ui-egui/src/i18n/vi.tsv b/crates/ui-egui/src/i18n/vi.tsv
index 9208112bf..41c7b7c0b 100644
--- a/crates/ui-egui/src/i18n/vi.tsv
+++ b/crates/ui-egui/src/i18n/vi.tsv
@@ -3632,6 +3632,10 @@ curves Smooth Làm mượt
Sent to {printer} Đã gửi tới {printer}
set in Print Settings… đặt trong thiết lập in…
ICO is limited to 256 × 256 pixels ICO giới hạn ở 256 × 256 pixel
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface Làm tối giao diện
+ Lighten Interface Làm sáng giao diện
# Bevel & Emboss Technique.
Technique Kỹ thuật
Chisel Hard Đục cứng
diff --git a/crates/ui-egui/src/i18n/zh-hans.tsv b/crates/ui-egui/src/i18n/zh-hans.tsv
index 2ebc4c71c..c420d748c 100644
--- a/crates/ui-egui/src/i18n/zh-hans.tsv
+++ b/crates/ui-egui/src/i18n/zh-hans.tsv
@@ -2755,6 +2755,10 @@ curves Smooth 平滑
Sent to {printer} 已发送到 {printer}
set in Print Settings… 在打印设置中设置…
ICO is limited to 256 × 256 pixels ICO 最大为 256 × 256 像素
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface 界面变暗
+ Lighten Interface 界面变亮
# Bevel & Emboss Technique.
Technique 方法
Chisel Hard 雕刻清晰
diff --git a/crates/ui-egui/src/i18n/zh-hant.tsv b/crates/ui-egui/src/i18n/zh-hant.tsv
index 92302285c..c4f9f4098 100644
--- a/crates/ui-egui/src/i18n/zh-hant.tsv
+++ b/crates/ui-egui/src/i18n/zh-hant.tsv
@@ -2740,6 +2740,10 @@ curves Smooth 平滑
Sent to {printer} 已傳送至 {printer}
set in Print Settings… 在列印設定中設定…
ICO is limited to 256 × 256 pixels ICO 最大為 256 × 256 像素
+
+# Darken / Lighten Interface (⇧⌘F1 / ⇧⌘F2)
+ Darken Interface 介面變暗
+ Lighten Interface 介面變亮
# Bevel & Emboss Technique.
Technique 方法
Chisel Hard 雕刻清晰
diff --git a/crates/ui-egui/src/menus.rs b/crates/ui-egui/src/menus.rs
index c20967b16..592acbc62 100644
--- a/crates/ui-egui/src/menus.rs
+++ b/crates/ui-egui/src/menus.rs
@@ -53,6 +53,9 @@ pub const UI_COMMANDS: &[(&str, &str, &[&str], Option<&str>)] = &[
("view.extras", "Extras", &["View"], Some("Cmd+H")),
("view.show.targetPath", "Target Path", &["View", "Show"], Some("Cmd+Shift+H")),
("view.screenMode.cycle", "Cycle Screen Mode", &[], Some("F")),
+ // Photoshop's interface brightness shortcuts: step through the four Pro themes.
+ ("view.darkenInterface", "Darken Interface", &[], Some("Cmd+Shift+F1")),
+ ("view.lightenInterface", "Lighten Interface", &[], Some("Cmd+Shift+F2")),
("edit.freeTransformCopy", "Free Transform a Copy", &[], Some("Cmd+Alt+T")),
("type.editText", "Edit Type", &[], None),
("view.zoomIn", "Zoom In", &["View"], Some("Cmd+=")),
@@ -376,6 +379,10 @@ pub(crate) fn invoke_unguarded(app: &mut PhotocraftApp, ctx: &egui::Context, id:
crate::prefs_ui::cycle_appearance(app, ctx);
Ok(Value::Null)
}
+ "view.darkenInterface" | "view.lightenInterface" => {
+ crate::prefs_ui::step_brightness(app, ctx, id == "view.lightenInterface")?;
+ Ok(json!({"theme": app.ui.theme.id()}))
+ }
"window.theme.system" => {
app.run("prefs.set", json!({"path": "interface.appearanceMode", "value": "auto"}))?;
crate::prefs_ui::sync_appearance(app, ctx);
@@ -752,6 +759,8 @@ pub fn is_enabled(app: &PhotocraftApp, id: &str) -> bool {
i if i.starts_with(DOCUMENT_ITEM) => true,
i if crate::links::url_for(i).is_some() => true,
i if i.starts_with("window.theme.") => true,
+ // Interface brightness works with or without a document, as in Photoshop.
+ "view.darkenInterface" | "view.lightenInterface" => true,
"file.save" | "file.saveAs" | "file.export.exportAs" | "file.export.quickExportAsPng" => {
app.session.active().is_some() && app.services.export.is_some()
}
diff --git a/crates/ui-egui/src/prefs_ui.rs b/crates/ui-egui/src/prefs_ui.rs
index 513b25701..7dd2ce2ea 100644
--- a/crates/ui-egui/src/prefs_ui.rs
+++ b/crates/ui-egui/src/prefs_ui.rs
@@ -128,6 +128,26 @@ pub(crate) fn cycle_appearance(app: &mut PhotocraftApp, ctx: &egui::Context) {
}
}
+/// Photoshop's four interface brightnesses, darkest first.
+const BRIGHTNESSES: [ThemeKind; 4] = [ThemeKind::Pro, ThemeKind::ProMedium, ThemeKind::ProLightGray, ThemeKind::ProLight];
+
+/// Darken Interface (⇧⌘F1, `lighter` false) and Lighten Interface (⇧⌘F2): the next of
+/// Photoshop's four brightnesses from the theme on screen, stopping at either end, as in
+/// Photoshop. Another theme steps from the nearest brightness: Medium Gray for a dark one, Light
+/// Gray for a light one. The choice is saved like picking it in Preferences › Interface.
+pub(crate) fn step_brightness(app: &mut PhotocraftApp, ctx: &egui::Context, lighter: bool) -> Result<(), String> {
+ let current = app.ui.theme;
+ let at = BRIGHTNESSES.iter().position(|k| *k == current).unwrap_or(if crate::theme::Tokens::for_kind(current).dark() { 1 } else { 2 });
+ let next = if lighter { (at + 1).min(BRIGHTNESSES.len() - 1) } else { at.saturating_sub(1) };
+ let Some(&kind) = BRIGHTNESSES.get(next) else { return Ok(()) };
+ if kind == current {
+ return Ok(());
+ }
+ app.run("prefs.set", json!({"path": "interface.theme", "value": kind.id()}))?;
+ sync_appearance(app, ctx);
+ Ok(())
+}
+
const LIGHT_THEME_OPTIONS: &[(&str, ThemeKind)] = &[
("proLight", ThemeKind::ProLight),
("proLightGray", ThemeKind::ProLightGray),
@@ -2169,6 +2189,65 @@ mod tests {
}
}
+ #[test]
+ fn darken_and_lighten_interface_step_through_photoshops_brightnesses_and_stop_at_the_ends() {
+ let ctx = egui::Context::default();
+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());
+ sync_appearance(&mut app, &ctx);
+ assert_eq!(app.ui.theme, ThemeKind::ProMedium, "Photoshop's default brightness");
+ let press = |app: &mut PhotocraftApp, id: &str| crate::menus::invoke(app, &ctx, id, json!({})).unwrap();
+ for expected in [ThemeKind::ProLightGray, ThemeKind::ProLight, ThemeKind::ProLight] {
+ press(&mut app, "view.lightenInterface");
+ assert_eq!(app.ui.theme, expected);
+ }
+ // Saved like a choice in Preferences › Interface: the light slot and the Light appearance.
+ let i = &app.session.prefs().interface;
+ assert_eq!((i.appearance_mode, i.light_theme), (AppearanceMode::Light, LightTheme::ProLight));
+ for expected in [ThemeKind::ProLightGray, ThemeKind::ProMedium, ThemeKind::Pro, ThemeKind::Pro] {
+ press(&mut app, "view.darkenInterface");
+ assert_eq!(app.ui.theme, expected);
+ }
+ let i = &app.session.prefs().interface;
+ assert_eq!((i.appearance_mode, i.dark_theme), (AppearanceMode::Dark, DarkTheme::Pro));
+ // Another theme steps from the nearest brightness.
+ for (theme, id, expected) in [
+ ("studio", "view.darkenInterface", ThemeKind::Pro),
+ ("studio", "view.lightenInterface", ThemeKind::ProLightGray),
+ ("classic", "view.darkenInterface", ThemeKind::ProMedium),
+ ("classic", "view.lightenInterface", ThemeKind::ProLight),
+ ] {
+ app.run("prefs.set", json!({"path": "interface.theme", "value": theme})).unwrap();
+ sync_appearance(&mut app, &ctx);
+ press(&mut app, id);
+ assert_eq!(app.ui.theme, expected, "{theme} {id}");
+ }
+ }
+
+ #[test]
+ fn ctrl_shift_f1_and_f2_darken_and_lighten_the_interface() {
+ for (id, shortcut) in [("view.darkenInterface", "Cmd+Shift+F1"), ("view.lightenInterface", "Cmd+Shift+F2")] {
+ assert_eq!(crate::shortcuts::default_shortcut(id).as_deref(), Some(shortcut), "{id}");
+ }
+ let ctx = egui::Context::default();
+ let mut app = PhotocraftApp::new(photocraft_engine::Session::new(), crate::Services::default());
+ sync_appearance(&mut app, &ctx);
+ let press = |app: &mut PhotocraftApp, key| {
+ let modifiers = egui::Modifiers::COMMAND | egui::Modifiers::SHIFT;
+ let raw = egui::RawInput {
+ events: vec![egui::Event::ModifiersChanged(modifiers), egui::Event::Key { key, physical_key: None, pressed: true, repeat: false, modifiers }],
+ ..Default::default()
+ };
+ ctx.begin_pass(raw);
+ crate::shortcuts::handle(app, &ctx);
+ ctx.end_pass().textures_delta.clear();
+ };
+ press(&mut app, egui::Key::F1);
+ assert_eq!(app.ui.theme, ThemeKind::Pro);
+ press(&mut app, egui::Key::F2);
+ press(&mut app, egui::Key::F2);
+ assert_eq!(app.ui.theme, ThemeKind::ProLightGray);
+ }
+
fn appearance_frame(app: &mut PhotocraftApp, ctx: &egui::Context, appearance: Option<egui::Theme>) {
ctx.run_ui(egui::RawInput { system_theme: appearance, ..Default::default() }, |ui| tick(app, ui.ctx())).textures_delta.clear();
}