1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

lv_obj_get_style: with NULL style check if the parent is focused and use the focused style

This commit is contained in:
Gabor Kiss-Vamosi 2018-01-13 08:18:10 +01:00
parent 86110cf1de
commit 94e686ba44

View File

@ -1202,7 +1202,17 @@ lv_style_t * lv_obj_get_style(lv_obj_t * obj)
while(par) {
if(par->style_p) {
if(par->style_p->glass == 0) {
#if USE_LV_GROUP == 0
style_act = par->style_p;
#else
/*Is a parent is focused then use then focused style*/
lv_group_t *g = lv_obj_get_group(par);
if(lv_group_get_focused(g) == par) {
style_act = lv_group_mod_style(g, par->style_p);
} else {
style_act = par->style_p;
}
#endif
break;
}
}