Merge pull request #519 from luniiya/feat/system-appearance

This commit is contained in:
Claude
2026-10-10 12:53:19 +00:00
15 changed files with 686 additions and 19 deletions
+5
View File
@@ -46,6 +46,7 @@ pub const UI_COMMANDS: &[UiCommand] = &[
uic!("view.safeMargins", "Title/Action Safe", [], None),
uic!("view.transparencyGrid", "Transparency Grid", [], None),
uic!("view.fastPreviews", "Fast Previews", [], None),
uic!("view.theme.toggle", "Next Appearance Mode", [], None),
uic!("view.theme.dark", "Theme: Dark", [], None),
uic!("view.theme.darker", "Theme: Darker", [], None),
uic!("view.theme.light", "Theme: Light", [], None),
@@ -471,6 +472,10 @@ pub fn invoke(app: &mut EffectcraftApp, ctx: &egui::Context, id: &str, params: V
app.ui.viewer.res = Resolution::Auto;
return Ok(Value::Null);
}
if id == "view.theme.toggle" {
app.cycle_appearance(ctx);
return Ok(json!({"appearanceMode": app.session.prefs.appearance.appearance_mode}));
}
if let Some(th) = id.strip_prefix("view.theme.") {
let k = crate::theme::ThemeKind::from_name(th).ok_or("unknown theme")?;
app.set_theme(ctx, k);