mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
widget_set_need_relayout_children after changed visibility
This commit is contained in:
parent
7c23271e29
commit
f430f73edf
@ -4,6 +4,7 @@
|
||||
* 增加TK\_GLYPH\_CACHE\_NR宏,允许开发者自行定义。
|
||||
* 更新文档(感谢俊杰提供补丁)。
|
||||
* 修改软件键盘删除键无效的问题。
|
||||
* set visible后设置relayout标志。
|
||||
|
||||
* 2019/07/03
|
||||
* 更新demoui
|
||||
|
@ -703,6 +703,7 @@ static ret_t widget_set_visible_self(widget_t* widget, bool_t visible) {
|
||||
widget->visible = visible;
|
||||
widget_update_style(widget);
|
||||
widget_invalidate_force(widget, NULL);
|
||||
widget_set_need_relayout_children(widget->parent);
|
||||
}
|
||||
|
||||
return RET_OK;
|
||||
@ -720,6 +721,8 @@ static ret_t widget_set_visible_recursive(widget_t* widget, bool_t visible) {
|
||||
return_value_if_fail(widget != NULL, RET_BAD_PARAMS);
|
||||
|
||||
widget->visible = visible;
|
||||
widget_set_need_relayout_children(widget->parent);
|
||||
|
||||
WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i)
|
||||
widget_set_visible_recursive(iter, visible);
|
||||
WIDGET_FOR_EACH_CHILD_END()
|
||||
|
Loading…
Reference in New Issue
Block a user