Add theme->apply_cb to replace theme->apply_xcb to make it compatible with the Micropython binding

This commit is contained in:
Gabor Kiss-Vamosi
2020-06-20 00:00:31 +02:00
parent 4345e05e32
commit 201d38c574
7 changed files with 35 additions and 16 deletions

View File

@@ -83,7 +83,7 @@ typedef struct {
/**********************
* STATIC PROTOTYPES
**********************/
static void theme_apply(lv_obj_t * obj, lv_theme_style_t name);
static void theme_apply(lv_theme_t * th, lv_obj_t * obj, lv_theme_style_t name);
static void style_init_reset(lv_style_t * style);
/**********************
@@ -552,14 +552,17 @@ lv_theme_t * lv_theme_mono_init(lv_color_t color_primary, lv_color_t color_secon
table_init();
win_init();
theme.apply_xcb = theme_apply;
theme.apply_xcb = NULL;
theme.apply_cb = theme_apply;
return &theme;
}
static void theme_apply(lv_obj_t * obj, lv_theme_style_t name)
static void theme_apply(lv_theme_t * th, lv_obj_t * obj, lv_theme_style_t name)
{
LV_UNUSED(th);
lv_style_list_t * list;
switch(name) {