1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

fix(theme): make the default theme consider the font parameter

related to: #4312
This commit is contained in:
Gabor Kiss-Vamosi 2023-06-26 09:36:41 +02:00
parent 5875901aa5
commit 7ca3ae661b
2 changed files with 2 additions and 1 deletions

View File

@ -773,7 +773,7 @@ void lv_disp_set_theme(lv_disp_t * disp, lv_theme_t * th)
disp->theme = th;
if(disp->screen_cnt == 3 &&
if(disp->screen_cnt == 4 &&
lv_obj_get_child_cnt(disp->screens[0]) == 0 &&
lv_obj_get_child_cnt(disp->screens[1]) == 0 &&
lv_obj_get_child_cnt(disp->screens[2]) == 0) {

View File

@ -255,6 +255,7 @@ static void style_init(void)
lv_style_set_bg_opa(&styles->scr, LV_OPA_COVER);
lv_style_set_bg_color(&styles->scr, color_scr);
lv_style_set_text_color(&styles->scr, color_text);
lv_style_set_text_font(&styles->scr, theme.font_normal);
lv_style_set_pad_row(&styles->scr, PAD_SMALL);
lv_style_set_pad_column(&styles->scr, PAD_SMALL);