Centralize colors in theme.h and propagate true-black background
- Extract design tokens to firmware/src/theme.h (THEME_BG, THEME_PANEL, THEME_TEXT, etc.); ui.cpp aliases COL_* to the THEME_* tokens - Splash container + canvas COL_EMPTY now use THEME_BG / 0x0000 instead of the hardcoded 0x0f0f0f / 0x10A2 dark grey - tools/convert_to_c.js maps "transparent" palette entries to 0x0000 (true black) so regenerated splash_animations.h matches the new bg - Re-regenerate splash_animations.h - Convert logo to RGB565A8 (alpha plane) so it composites against any background — no more grey halo around the upper-left logo on screens where the bg differs from the previous baked-in 0x18E3 color
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
#include "splash.h"
|
||||
#include "splash_animations.h"
|
||||
#include "theme.h"
|
||||
#include <Arduino.h>
|
||||
#include <esp_heap_caps.h>
|
||||
|
||||
@@ -10,7 +11,7 @@
|
||||
#define CANVAS_H (GRID * CELL)
|
||||
|
||||
// Background fallback when palette is missing
|
||||
#define COL_EMPTY 0x10A2 // dark bg (#0f0f0f)
|
||||
#define COL_EMPTY 0x0000 // true black (matches THEME_BG)
|
||||
|
||||
LV_FONT_DECLARE(font_styrene_28);
|
||||
|
||||
@@ -57,7 +58,7 @@ void splash_init(lv_obj_t *parent) {
|
||||
splash_container = lv_obj_create(parent);
|
||||
lv_obj_set_size(splash_container, 480, 480);
|
||||
lv_obj_set_pos(splash_container, 0, 0);
|
||||
lv_obj_set_style_bg_color(splash_container, lv_color_hex(0x0f0f0f), 0);
|
||||
lv_obj_set_style_bg_color(splash_container, THEME_BG, 0);
|
||||
lv_obj_set_style_bg_opa(splash_container, LV_OPA_COVER, 0);
|
||||
lv_obj_set_style_border_width(splash_container, 0, 0);
|
||||
lv_obj_set_style_pad_all(splash_container, 0, 0);
|
||||
|
||||
Reference in New Issue
Block a user