lv_cont: inform children about parent size change on autofit
This commit is contained in:
@@ -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);
|
lv_obj_t * par = lv_obj_get_parent(obj);
|
||||||
if(par != NULL) par->signal_func(par, LV_SIGNAL_CHILD_CHG, obj);
|
if(par != NULL) par->signal_func(par, LV_SIGNAL_CHILD_CHG, obj);
|
||||||
|
|
||||||
|
/*Tell the children the parent's size has changed*/
|
||||||
/*Tell the children the paren's size has changed*/
|
|
||||||
lv_obj_t * i;
|
lv_obj_t * i;
|
||||||
LL_READ(obj->child_ll, i) {
|
LL_READ(obj->child_ll, i) {
|
||||||
i->signal_func(i, LV_SIGNAL_PARENT_SIZE_CHG, NULL);
|
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*/
|
/*Inform the parent about the new coordinates*/
|
||||||
lv_obj_t * par = lv_obj_get_parent(cont);
|
lv_obj_t * par = lv_obj_get_parent(cont);
|
||||||
par->signal_func(par, LV_SIGNAL_CHILD_CHG, 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);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user