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

fixed compilation errors when USE_LV_GROUP == 0

This commit is contained in:
manison 2019-02-18 08:34:41 +01:00
parent 5dfac5a92b
commit df88e319a8
10 changed files with 52 additions and 0 deletions

View File

@ -80,8 +80,10 @@ void lv_theme_set_current(lv_theme_t * th)
if(s) memcpy(&th_styles[i], (void *)s, sizeof(lv_style_t));
}
#if USE_LV_GROUP
/*Copy group style modification callback functions*/
memcpy(&current_theme.group, &th->group, sizeof(th->group));
#endif
/*Let the object know their style might change*/
lv_obj_report_style_mod(NULL);

View File

@ -293,11 +293,13 @@ typedef struct {
#endif
} style;
#if USE_LV_GROUP
struct
{
lv_group_style_mod_func_t style_mod;
lv_group_style_mod_func_t style_mod_edit;
} group;
#endif
} lv_theme_t;
/**********************

View File

@ -806,6 +806,8 @@ static void win_init(void)
#endif
}
#if USE_LV_GROUP
static void style_mod(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
@ -841,6 +843,8 @@ static void style_mod_edit(lv_style_t * style)
#endif
}
#endif /*USE_LV_GROUP*/
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -897,8 +901,10 @@ lv_theme_t * lv_theme_alien_init(uint16_t hue, lv_font_t * font)
table_init();
win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme;
}

View File

@ -355,6 +355,8 @@ static void win_init(void)
#endif
}
#if USE_LV_GROUP
static void style_mod(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
@ -399,6 +401,8 @@ static void style_mod_edit(lv_style_t * style)
#endif
}
#endif /*USE_LV_GROUP*/
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -450,8 +454,10 @@ lv_theme_t * lv_theme_default_init(uint16_t hue, lv_font_t * font)
tabview_init();
win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme;
}

View File

@ -785,6 +785,8 @@ static void win_init(void)
#endif
}
#if USE_LV_GROUP
static void style_mod(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
@ -829,6 +831,8 @@ static void style_mod_edit(lv_style_t * style)
#endif
}
#endif /*USE_LV_GROUP*/
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -887,8 +891,10 @@ lv_theme_t * lv_theme_material_init(uint16_t hue, lv_font_t * font)
table_init();
win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme;
}

View File

@ -412,6 +412,8 @@ static void win_init(void)
#endif
}
#if USE_LV_GROUP
static void style_mod(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
@ -444,6 +446,8 @@ static void style_mod_edit(lv_style_t * style)
#endif
}
#endif /*USE_LV_GROUP*/
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -499,8 +503,10 @@ lv_theme_t * lv_theme_mono_init(uint16_t hue, lv_font_t * font)
tabview_init();
win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme;
}

View File

@ -781,6 +781,8 @@ static void win_init(void)
#endif
}
#if USE_LV_GROUP
static void style_mod(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
@ -800,6 +802,8 @@ static void style_mod(lv_style_t * style)
#endif
}
#endif /*USE_LV_GROUP*/
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -855,8 +859,10 @@ lv_theme_t * lv_theme_nemo_init(uint16_t hue, lv_font_t * font)
table_init();
win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod;
#endif
return &theme;
}

View File

@ -695,6 +695,8 @@ static void win_init(void)
#endif
}
#if USE_LV_GROUP
static void style_mod(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
@ -727,6 +729,8 @@ static void style_mod_edit(lv_style_t * style)
#endif
}
#endif /*USE_LV_GROUP*/
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -785,8 +789,10 @@ lv_theme_t * lv_theme_night_init(uint16_t hue, lv_font_t * font)
table_init();
win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme;
}

View File

@ -364,6 +364,8 @@ static void win_init(void)
#endif
}
#if USE_LV_GROUP
static void style_mod(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
@ -408,6 +410,8 @@ static void style_mod_edit(lv_style_t * style)
#endif
}
#endif /*USE_LV_GROUP*/
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -463,8 +467,10 @@ lv_theme_t * lv_theme_templ_init(uint16_t hue, lv_font_t * font)
tabview_init();
win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme;
}

View File

@ -758,6 +758,8 @@ static void win_init(void)
#endif
}
#if USE_LV_GROUP
static void style_mod(lv_style_t * style)
{
#if LV_COLOR_DEPTH != 1
@ -796,6 +798,8 @@ static void style_mod_edit(lv_style_t * style)
#endif
}
#endif /*USE_LV_GROUP*/
/**********************
* GLOBAL FUNCTIONS
**********************/
@ -854,8 +858,10 @@ lv_theme_t * lv_theme_zen_init(uint16_t hue, lv_font_t * font)
table_init();
win_init();
#if USE_LV_GROUP
theme.group.style_mod = style_mod;
theme.group.style_mod_edit = style_mod_edit;
#endif
return &theme;
}