improve combobox

This commit is contained in:
lixianjing 2023-11-25 08:24:34 +08:00
parent 79ab3a276d
commit 0ffc52bc5c
2 changed files with 7 additions and 1 deletions

View File

@ -1,5 +1,8 @@
# 最新动态
2023/11/25
* 修复combo_box的resize的处理不正常问题(感谢智明提供补丁)
2023/11/24
* 完善remote ui service
* 支持 combox 不需要手动写偏移文字也可以居中(感谢智明提供补丁)

View File

@ -460,8 +460,11 @@ static ret_t combo_box_on_event(widget_t* widget, event_t* e) {
}
case EVT_RESIZE:
case EVT_MOVE_RESIZE: {
if (edit_get_right_margin(widget) == 0) {
uint32_t right_margin = edit_get_right_margin(widget);
if (right_margin == 0) {
edit->right_margin = widget->h;
} else {
edit->right_margin = right_margin;
}
break;
}