mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
fix(obj style) fix children reposition if the parent's padding changes.
fixes #2368
This commit is contained in:
parent
d79ca388ef
commit
57cf6610a9
@ -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) {
|
else if(code == LV_EVENT_PRESS_LOST) {
|
||||||
lv_obj_clear_state(obj, LV_STATE_PRESSED);
|
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) {
|
else if(code == LV_EVENT_KEY) {
|
||||||
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
|
if(lv_obj_has_flag(obj, LV_OBJ_FLAG_CHECKABLE)) {
|
||||||
char c = *((char *)lv_event_get_param(e));
|
char c = *((char *)lv_event_get_param(e));
|
||||||
|
Loading…
x
Reference in New Issue
Block a user