This commit is contained in:
marc 2025-11-17 22:31:09 +01:00
parent 27c2376717
commit ab2399ce50
4 changed files with 9621 additions and 4 deletions

View File

@ -6,6 +6,7 @@ make_font(12)
make_font(18) make_font(18)
make_font(24) make_font(24)
execute_process(COMMAND podman run -v /home/marc/rgb_lcd/components/domotic_display/fonts:/app -w /app lvfontconv lv_font_conv --bpp 4 --size 36 --no-compress --font Roboto-Medium.ttf --symbols "0123456789.°àéèûCABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz %,'():ê/-" --format lvgl -o roboto_medium_36.c --font fa-solid-900.ttf --range 61461,0xf0c2,0xf575) execute_process(COMMAND podman run -v /home/marc/rgb_lcd/components/domotic_display/fonts:/app -w /app lvfontconv lv_font_conv --bpp 4 --size 36 --no-compress --font Roboto-Medium.ttf --symbols "0123456789.°àéèûCABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz %,'():ê/-" --format lvgl -o roboto_medium_36.c --font fa-solid-900.ttf --range 61461,0xf0c2,0xf575)
execute_process(COMMAND podman run -v /home/marc/rgb_lcd/components/domotic_display/fonts:/app -w /app lvfontconv lv_font_conv --bpp 4 --size 72 --no-compress --font Roboto-Medium.ttf --symbols "0123456789.°àéèûCABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz %,'():ê/-" --format lvgl -o roboto_medium_72.c --font fa-solid-900.ttf --range 61461,0xf0c2,0xf575)
idf_component_register(SRC_DIRS . fonts idf_component_register(SRC_DIRS . fonts
INCLUDE_DIRS "include" INCLUDE_DIRS "include"

File diff suppressed because it is too large Load Diff

View File

@ -1050,6 +1050,7 @@ LV_FONT_DECLARE(montserrat_medium_12);
LV_FONT_DECLARE(montserrat_medium_18); LV_FONT_DECLARE(montserrat_medium_18);
LV_FONT_DECLARE(montserrat_medium_24); LV_FONT_DECLARE(montserrat_medium_24);
LV_FONT_DECLARE(roboto_medium_36); LV_FONT_DECLARE(roboto_medium_36);
LV_FONT_DECLARE(roboto_medium_72);
void draw_ihm() void draw_ihm()
{ {
@ -1094,6 +1095,16 @@ void draw_ihm()
lv_obj_set_flex_flow(bg_cont, LV_FLEX_FLOW_COLUMN); lv_obj_set_flex_flow(bg_cont, LV_FLEX_FLOW_COLUMN);
lv_obj_set_style_pad_top(bg_cont, 5, 0); lv_obj_set_style_pad_top(bg_cont, 5, 0);
lv_color_t base = LV_COLOR_MAKE(0xff, 0xff, 0xff);
lv_color_t accent = LV_COLOR_MAKE(0xcc, 0x00, 0x00);
lv_color_t new = LV_COLOR_MAKE(0xaa, 0xaa, 0xaa);
lv_obj_set_style_bg_color(lv_scr_act(), new,0);
static lv_style_t objstyle;
lv_style_init(&objstyle);
lv_style_set_bg_color(&objstyle, accent);
lv_style_set_outline_color(&objstyle, accent);
/* info area */ /* info area */
@ -1110,6 +1121,8 @@ void draw_ihm()
lv_obj_remove_style_all(date_and_time); lv_obj_remove_style_all(date_and_time);
lv_obj_set_size(date_and_time, LV_SIZE_CONTENT, LV_SIZE_CONTENT); lv_obj_set_size(date_and_time, LV_SIZE_CONTENT, LV_SIZE_CONTENT);
lv_obj_add_style(date_and_time, &objstyle,0);
lv_obj_t * date = lv_spangroup_create(date_and_time); lv_obj_t * date = lv_spangroup_create(date_and_time);
//lv_obj_add_style(date, &c->fonts[FONT_HEADING_MD], 0); //lv_obj_add_style(date, &c->fonts[FONT_HEADING_MD], 0);
//lv_obj_add_style(date, &c->styles[STYLE_COLOR_BASE][STYLE_TYPE_TEXT], 0); //lv_obj_add_style(date, &c->styles[STYLE_COLOR_BASE][STYLE_TYPE_TEXT], 0);
@ -1118,11 +1131,32 @@ void draw_ihm()
//lv_subject_add_observer_obj(&c->th, theme_observer_accent_span_cb, date, day_and_month); //lv_subject_add_observer_obj(&c->th, theme_observer_accent_span_cb, date, day_and_month);
//lv_subject_add_observer_obj(&c->subject_groups.date.group, date_observer_cb, date, c); //lv_subject_add_observer_obj(&c->subject_groups.date.group, date_observer_cb, date, c);
static lv_style_t txtstyle;
lv_style_init(&txtstyle);
lv_style_set_text_color(&txtstyle, accent);
lv_style_set_line_color(&txtstyle, accent);
lv_style_set_text_font(&txtstyle, &roboto_medium_72);
static lv_style_t txtstyle_inv;
lv_style_init(&txtstyle_inv);
lv_style_set_text_color(&txtstyle_inv, base);
lv_style_set_line_color(&txtstyle_inv, base);
lv_style_set_text_font(&txtstyle_inv, &roboto_medium_72);
lv_obj_t * time = lv_spangroup_create(date_and_time); lv_obj_t * time = lv_spangroup_create(date_and_time);
//lv_obj_add_style(time, &c->fonts[FONT_HEADING_XXL], 0); lv_obj_add_style(time, &txtstyle, 0);
//lv_obj_add_style(time, &c->styles[STYLE_COLOR_BASE][STYLE_TYPE_TEXT], 0); lv_span_t * timeSpan = lv_spangroup_add_span(time);
lv_spangroup_add_span(time); lv_span_set_text(timeSpan,"21");
lv_span_t * minute = lv_spangroup_add_span(time); lv_span_t * minute = lv_spangroup_add_span(time);
lv_span_set_text(minute,":56");
lv_style_set_text_color(lv_span_get_style(minute),base);
lv_style_set_line_color(lv_span_get_style(minute), accent);
//lv_subject_add_observer_obj(&c->th, theme_observer_accent_span_cb, time, minute); //lv_subject_add_observer_obj(&c->th, theme_observer_accent_span_cb, time, minute);
//lv_subject_add_observer_obj(&c->subject_groups.time.group, time_observer_cb, time, c); //lv_subject_add_observer_obj(&c->subject_groups.time.group, time_observer_cb, time, c);
@ -1141,7 +1175,8 @@ void draw_ihm()
create_card(apps, "Météo"); create_card(apps, "Météo");
create_card(apps,"Volets"); create_card(apps,"Volets");
create_card(apps,"Machine à laver"); create_card(apps,"Minuteur");
create_card(apps,"Messagerie");
return; return;
//Create a Tab view object //Create a Tab view object

View File

@ -8,6 +8,7 @@ idf_component_register(SRCS
"../../fonts/montserrat_medium_18.c" "../../fonts/montserrat_medium_18.c"
"../../fonts/montserrat_medium_24.c" "../../fonts/montserrat_medium_24.c"
"../../fonts/roboto_medium_36.c" "../../fonts/roboto_medium_36.c"
"../../fonts/roboto_medium_72.c"
INCLUDE_DIRS INCLUDE_DIRS
"../../include" "../../include"
WHOLE_ARCHIVE WHOLE_ARCHIVE