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

theme: update group styles in lv_theme_set_current

This commit is contained in:
Gabor Kiss-Vamosi 2019-05-18 14:03:44 +02:00
parent 83d64fed42
commit f7bc8c2328
2 changed files with 12 additions and 3 deletions

View File

@ -7,7 +7,7 @@
* INCLUDES
*********************/
#include "lv_draw_img.h"
#include "lv_log.h"
#include "../lv_misc/lv_log.h"
/*********************
* DEFINES

View File

@ -57,6 +57,15 @@ void lv_theme_set_current(lv_theme_t * th)
{
#if LV_THEME_LIVE_UPDATE == 0
current_theme = th;
#if LV_USE_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);
#else
uint32_t style_num = sizeof(th->style) / sizeof(lv_style_t *); /*Number of styles in a theme*/
@ -87,10 +96,10 @@ void lv_theme_set_current(lv_theme_t * th)
/*Let the object know their style might change*/
lv_obj_report_style_mod(NULL);
#if LV_USE_GROUP
lv_group_report_style_mod(NULL);
#endif
#if LV_USE_GROUP
lv_group_report_style_mod(NULL);
#endif
}