mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-30 02:58:26 +08:00
fix widget_set_state scripting binding bug.
This commit is contained in:
parent
bcc1091b7b
commit
f35b31581d
@ -1,8 +1,14 @@
|
||||
# 最新动态
|
||||
|
||||
* 2019/12/07
|
||||
* 修改 widget\_set\_state 脚本绑定时的问题(感谢大恒提供补丁)。
|
||||
|
||||
* 2019/12/06
|
||||
* 完善脚本绑定。
|
||||
|
||||
* 2019/12/05
|
||||
* 修改了image_animation控件的format、sequence属性设置,为空字符串时设为空,避免显示有误(感谢朝泽提供补丁)。
|
||||
* 增加文档how_to_use_mutable_image.md(感谢智明提供补丁)。
|
||||
* 修改了 image_animation 控件的 format、sequence 属性设置,为空字符串时设为空,避免显示有误(感谢朝泽提供补丁)。
|
||||
* 增加文档 how\_to\_use\_mutable\_image.md(感谢智明提供补丁)。
|
||||
|
||||
* 2019/12/04
|
||||
* awtk 增加对 lcd 为 rgb888 的支持 (感谢智明提供补丁)。
|
||||
|
@ -138,6 +138,7 @@ static ret_t widget_real_destroy(widget_t* widget) {
|
||||
}
|
||||
|
||||
TKMEM_FREE(widget->name);
|
||||
TKMEM_FREE(widget->state);
|
||||
TKMEM_FREE(widget->style);
|
||||
TKMEM_FREE(widget->tr_text);
|
||||
TKMEM_FREE(widget->animation);
|
||||
@ -633,7 +634,7 @@ ret_t widget_set_state(widget_t* widget, const char* state) {
|
||||
|
||||
if (!tk_str_eq(widget->state, state)) {
|
||||
widget_invalidate_force(widget, NULL);
|
||||
widget->state = state;
|
||||
widget->state = tk_str_copy(widget->state, state);
|
||||
widget_set_need_update_style(widget);
|
||||
widget_invalidate_force(widget, NULL);
|
||||
}
|
||||
@ -2669,7 +2670,7 @@ widget_t* widget_init(widget_t* widget, widget_t* parent, const widget_vtable_t*
|
||||
widget->emitter = NULL;
|
||||
widget->children = NULL;
|
||||
widget->initializing = TRUE;
|
||||
widget->state = WIDGET_STATE_NORMAL;
|
||||
widget->state = tk_str_copy(widget->state, WIDGET_STATE_NORMAL);
|
||||
widget->target = NULL;
|
||||
widget->key_target = NULL;
|
||||
widget->grab_widget = NULL;
|
||||
|
@ -384,7 +384,7 @@ struct _widget_t {
|
||||
* @annotation ["readable"]
|
||||
* 控件的状态(取值参考widget_state_t)。
|
||||
*/
|
||||
const char* state;
|
||||
char* state;
|
||||
/**
|
||||
* @property {uint8_t} opacity
|
||||
* @annotation ["readable"]
|
||||
|
Loading…
Reference in New Issue
Block a user