feat: add default theme

This commit is contained in:
2026-08-28 11:01:03 +07:00
parent 7e421a0f3e
commit fc796582a8
4 changed files with 544 additions and 98 deletions
+12 -8
View File
@@ -31,22 +31,26 @@ fn main() {
tracing::error!("Failed to load theme {name}: {err}");
}
}
let light_theme = registry.themes().get("Signed Light").cloned();
let dark_theme = registry.themes().get("Signed Dark").cloned();
//let light_theme = registry.themes().get("Signed Light").cloned();
//let dark_theme = registry.themes().get("Signed Dark").cloned();
let theme = Theme::global_mut(cx);
theme.radius = px(2.);
theme.radius_lg = px(6.);
theme.focus_ring = false;
theme.shadow = false;
//if let Some(light) = light_theme {
// theme.light_theme = light;
//}
if let Some(light) = light_theme {
theme.light_theme = light;
} else {
tracing::warn!("Signed Light theme is missing from the registry");
}
//if let Some(dark) = dark_theme {
// theme.dark_theme = dark;
//}
if let Some(dark) = dark_theme {
theme.dark_theme = dark;
} else {
tracing::warn!("Signed Dark theme is missing from the registry");
}
// Sync the theme with the system appearance
Theme::sync_system_appearance(None, cx);