mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-28 07:03:00 +08:00
lv_cont: inform children about parent size change on autofit
This commit is contained in:
parent
ddbd8386d2
commit
9141d95865
@ -624,8 +624,7 @@ void lv_obj_set_size(lv_obj_t * obj, lv_coord_t w, lv_coord_t h)
|
||||
lv_obj_t * par = lv_obj_get_parent(obj);
|
||||
if(par != NULL) par->signal_func(par, LV_SIGNAL_CHILD_CHG, obj);
|
||||
|
||||
|
||||
/*Tell the children the paren's size has changed*/
|
||||
/*Tell the children the parent's size has changed*/
|
||||
lv_obj_t * i;
|
||||
LL_READ(obj->child_ll, i) {
|
||||
i->signal_func(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL);
|
||||
|
@ -710,6 +710,12 @@ static void lv_cont_refr_autofit(lv_obj_t * cont)
|
||||
/*Inform the parent about the new coordinates*/
|
||||
lv_obj_t * par = lv_obj_get_parent(cont);
|
||||
par->signal_func(par, LV_SIGNAL_CHILD_CHG, cont);
|
||||
|
||||
/*Tell the children the parent's size has changed*/
|
||||
lv_obj_t * i;
|
||||
LL_READ(cont->child_ll, i) {
|
||||
i->signal_func(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user