This commit is contained in:
2026-01-26 09:05:48 +08:00
commit f218a21377
20 changed files with 7774 additions and 0 deletions

26
ui/theme/theme.slint Normal file
View File

@@ -0,0 +1,26 @@
// Theme Manager
// Global theme state with light/dark mode support
import { ColorPalette, LightColors, DarkColors } from "colors.slint";
import { Typography } from "typography.slint";
import { SpacingSystem } from "spacing.slint";
// Global theme manager (singleton)
export global Theme {
// Theme state
in-out property <bool> is-dark-mode: false;
// Current active color palette (reactive)
out property <ColorPalette> colors: is-dark-mode ?
DarkColors.palette : LightColors.palette;
// Theme toggle callback
callback toggle-theme();
toggle-theme => {
is-dark-mode = !is-dark-mode;
}
}
// Re-export for convenience
export { Typography, SpacingSystem }