mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-14 06:42:58 +08:00
fix(theme): fix mono theme init
This commit is contained in:
parent
bc94b4de52
commit
5ec6694f78
@ -175,7 +175,7 @@ lv_theme_t * lv_theme_mono_init(lv_disp_t * disp, bool dark_bg, const lv_font_t
|
|||||||
/*This trick is required only to avoid the garbage collection of
|
/*This trick is required only to avoid the garbage collection of
|
||||||
*styles' data if LVGL is used in a binding (e.g. Micropython)
|
*styles' data if LVGL is used in a binding (e.g. Micropython)
|
||||||
*In a general case styles could be in simple `static lv_style_t my_style...` variables*/
|
*In a general case styles could be in simple `static lv_style_t my_style...` variables*/
|
||||||
if(!lv_theme_mono_is_inited()) {
|
if(!inited) {
|
||||||
inited = false;
|
inited = false;
|
||||||
LV_GC_ROOT(_lv_theme_default_styles) = lv_mem_alloc(sizeof(my_theme_styles_t));
|
LV_GC_ROOT(_lv_theme_default_styles) = lv_mem_alloc(sizeof(my_theme_styles_t));
|
||||||
styles = (my_theme_styles_t *)LV_GC_ROOT(_lv_theme_default_styles);
|
styles = (my_theme_styles_t *)LV_GC_ROOT(_lv_theme_default_styles);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user