theme config, layout preview, container alignment
Server: ThemeConfig entity + CRUD (GET/PUT /theme), SQLite persistence, ThemeUpdate broadcast to ESP32 on save and initial connect. Client: render engine uses theme colors, full-screen redraw on theme change. SPA: theme page with color pickers + presets, layout preview with TS port of layout engine, justify/align controls on containers. DisplayHint refactored to struct (kind + h_align + v_align).
This commit is contained in:
@@ -44,11 +44,12 @@ pub fn run(
|
||||
let is_screen_update = matches!(msg, ServerMessage::ScreenUpdate { .. });
|
||||
let repaints = app.handle_message(msg);
|
||||
|
||||
if app.take_theme_changed() {
|
||||
let theme_changed = app.take_theme_changed();
|
||||
if theme_changed {
|
||||
engine.set_theme(app.theme().clone());
|
||||
}
|
||||
|
||||
if !repaints.is_empty() && (first_update || is_screen_update) {
|
||||
if !repaints.is_empty() && (first_update || is_screen_update || theme_changed) {
|
||||
let bg = engine.theme().background;
|
||||
display.fill_rect(screen, bg).unwrap();
|
||||
first_update = false;
|
||||
|
||||
Reference in New Issue
Block a user