mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(theme): fix operating without default theme
This commit is contained in:
parent
981f63c3fa
commit
fcc9f725a5
@ -125,12 +125,13 @@ void lv_init(void)
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_disp_ll), sizeof(lv_disp_t));
|
||||
_lv_ll_init(&LV_GC_ROOT(_lv_indev_ll), sizeof(lv_indev_t));
|
||||
|
||||
#ifdef LV_THEME_INIT
|
||||
lv_theme_t * th = LV_THEME_INIT(LV_THEME_COLOR_PRIMARY, LV_THEME_COLOR_SECONDARY,
|
||||
LV_THEME_FONT_SMALL, LV_THEME_FONT_NORMAL,
|
||||
LV_THEME_FONT_LARGE, LV_THEME_FONT_EXTRA_LARGE);
|
||||
|
||||
lv_theme_set_act(th);
|
||||
|
||||
#endif
|
||||
/*Initialize the screen refresh system*/
|
||||
_lv_refr_init();
|
||||
|
||||
|
@ -64,6 +64,7 @@ void lv_theme_apply(lv_obj_t * obj)
|
||||
|
||||
lv_obj_remove_style(obj, LV_PART_ANY, LV_STATE_ANY, NULL);
|
||||
|
||||
if(act_theme == NULL) return;
|
||||
apply_theme(act_theme, obj); /*Apply the theme including the base theme(s)*/
|
||||
|
||||
lv_obj_enable_style_refresh(true);
|
||||
|
Loading…
x
Reference in New Issue
Block a user