Skip to content

Commit

Permalink
fix(obj style) fix children reposition if the parent's padding changes.
Browse files Browse the repository at this point in the history
fixes #2368
  • Loading branch information
kisvegabor committed Jul 15, 2021
1 parent d79ca38 commit 57cf661
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/core/lv_obj.c
Expand Up @@ -679,6 +679,13 @@ static void lv_obj_event(const lv_obj_class_t * class_p, lv_event_t * e)
else if(code == LV_EVENT_PRESS_LOST) {
lv_obj_clear_state(obj, LV_STATE_PRESSED);
}
else if(code == LV_EVENT_STYLE_CHANGED) {
uint32_t child_cnt = lv_obj_get_child_cnt(obj);
for(uint32_t i = 0; i < child_cnt; i++) {
lv_obj_t * child = obj->spec_attr->children[i];
lv_obj_mark_layout_as_dirty(child);
}
}
else if(code == LV_EVENT_KEY) {
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
char c = *((char *)lv_event_get_param(e));
Expand Down

0 comments on commit 57cf661

Please sign in to comment.