mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-11-29 18:48:09 +08:00
improve edit/mledit
This commit is contained in:
parent
e93328725c
commit
b3558efedc
@ -4,6 +4,7 @@
|
||||
* 修复 arm linux 编译问题(感谢俊杰提供补丁)
|
||||
* 完善 mledit/edit 文档 (感谢大恒提供补丁)
|
||||
* 完善 str\_expand\_vars(感谢朝泽提供补丁)
|
||||
* 修复 edit 和 mledi t 控件不断 invalidate 的问题 (感谢智明提供补丁)
|
||||
|
||||
* 2020/01/15
|
||||
* 点击鼠标右键触发 context menu 事件。
|
||||
|
@ -365,11 +365,12 @@ static ret_t mledit_on_event(widget_t* widget, event_t* e) {
|
||||
mledit_request_input_method(widget);
|
||||
}
|
||||
mledit_update_status(widget);
|
||||
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_POINTER_DOWN_ABORT: {
|
||||
mledit_pointer_up_cleanup(widget);
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_POINTER_MOVE: {
|
||||
@ -405,6 +406,7 @@ static ret_t mledit_on_event(widget_t* widget, event_t* e) {
|
||||
|
||||
mledit_update_status(widget);
|
||||
ret = RET_STOP;
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_IM_COMMIT: {
|
||||
@ -417,6 +419,7 @@ static ret_t mledit_on_event(widget_t* widget, event_t* e) {
|
||||
}
|
||||
mledit_commit_str(widget, evt->text);
|
||||
mledit_update_status(widget);
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_IM_ACTION: {
|
||||
@ -469,15 +472,18 @@ static ret_t mledit_on_event(widget_t* widget, event_t* e) {
|
||||
}
|
||||
}
|
||||
ret = RET_STOP;
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_RESIZE:
|
||||
case EVT_MOVE_RESIZE: {
|
||||
mledit_reset_text_edit_layout(mledit->model);
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_VALUE_CHANGING: {
|
||||
mledit_update_status(widget);
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
@ -534,11 +534,12 @@ ret_t edit_on_event(widget_t* widget, event_t* e) {
|
||||
input_method_request(input_method(), widget);
|
||||
}
|
||||
edit_update_status(widget);
|
||||
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_POINTER_DOWN_ABORT: {
|
||||
edit_pointer_up_cleanup(widget);
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_POINTER_MOVE: {
|
||||
@ -568,6 +569,7 @@ ret_t edit_on_event(widget_t* widget, event_t* e) {
|
||||
return RET_STOP;
|
||||
}
|
||||
}
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_IM_COMMIT: {
|
||||
@ -615,10 +617,12 @@ ret_t edit_on_event(widget_t* widget, event_t* e) {
|
||||
case EVT_RESIZE:
|
||||
case EVT_MOVE_RESIZE: {
|
||||
text_edit_layout(edit->model);
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
case EVT_VALUE_CHANGING: {
|
||||
edit_update_status(widget);
|
||||
widget_invalidate(widget, NULL);
|
||||
break;
|
||||
}
|
||||
default:
|
||||
|
Loading…
Reference in New Issue
Block a user