improve widget_set_need_relayout

This commit is contained in:
lixianjing 2021-05-15 12:17:06 +08:00
parent 6e56a46031
commit 03801b61da
2 changed files with 6 additions and 0 deletions

View File

@ -3,6 +3,7 @@
2021/05/15
* 完善圆角矩形(感谢智明提供补丁)
* 修改label高度的限制条件。
* 完善widget\_set\_need\_relayout。
2021/05/14
* switch支持click事件支持space/return触发。

View File

@ -4138,6 +4138,11 @@ ret_t widget_set_need_relayout(widget_t* widget) {
return_value_if_fail(widget != NULL, RET_BAD_PARAMS);
widget->need_relayout = TRUE;
if (widget->parent != NULL) {
if (widget->parent->auto_adjust_size || widget->parent->children_layout != NULL) {
widget_set_need_relayout(widget->parent);
}
}
return RET_OK;
}