Unify colors via theme CSS variables; theme egui visuals
Add Theme::var(name, ctx) (CSS custom-property getter) and Theme::apply_to_egui(ctx) which maps the palette onto egui's global Visuals so standard widgets share the theme colors. Add a mobile::palette::Palette built from the theme each frame and replace the duplicated per-file C_* color constants across all mobile modules (omni, topbar, stack, inspector, transport, intent, shell) with it. Add --scrim and --accent-* category vars to styles.css. Apply the theme visuals every frame in update(). Mobile and the main UI now share one CSS-variable-driven palette that responds to light/dark/user themes.
This commit is contained in:
@@ -99,6 +99,14 @@
|
||||
--font-size-small: 11px;
|
||||
--font-size-default: 13px;
|
||||
--pane-border-width: 1px;
|
||||
|
||||
/* Modal backdrop (translucent) + intent/category accents (shared by light & dark) */
|
||||
--scrim: #10141ab0;
|
||||
--accent-coral: #e8826b;
|
||||
--accent-cyan: #54c3e8;
|
||||
--accent-amber: #f4a340;
|
||||
--accent-pink: #c75b8a;
|
||||
--accent-violet: #8a6ec0;
|
||||
}
|
||||
|
||||
/* ============================================
|
||||
|
||||
Reference in New Issue
Block a user