improve hscrollable

This commit is contained in:
lixianjing 2021-06-08 16:34:34 +08:00
parent 97d496931b
commit 7944a1d915
2 changed files with 8 additions and 2 deletions

View File

@ -4,6 +4,7 @@
* 完善编译脚本(感谢兆坤提供补丁)
* 完善slide view垂直slide view用上下键切换页面。
* 完善slide view处理滑动太快中间没有move事件的问题。
* 修复hscrollable点击边缘控件没有滚动效果的问题(感谢智明提供补丁)
2021/06/07
* 重构和完善文档。

View File

@ -274,8 +274,13 @@ ret_t hscrollable_set_prop(hscrollable_t* hscrollable, const char* name, const v
} else if (tk_str_eq(name, WIDGET_PROP_XSLIDABLE)) {
return RET_OK;
} else if (tk_str_eq(name, WIDGET_PROP_XOFFSET)) {
hscrollable->xoffset = value_int(v);
widget_invalidate_force(hscrollable_get_widget(hscrollable), NULL);
if (hscrollable->wa != NULL) {
hscrollable->xoffset = value_int(v);
widget_invalidate_force(hscrollable_get_widget(hscrollable), NULL);
} else {
hscrollable->xoffset_end = value_int(v);
hscrollable_scroll_to(hscrollable, hscrollable->xoffset_end, 300);
}
return RET_OK;
} else if (tk_str_eq(name, WIDGET_PROP_YOFFSET)) {
return RET_OK;