mirror of
https://gitee.com/zlgopen/awtk.git
synced 2024-12-02 03:58:33 +08:00
improve widget_is_point_in
This commit is contained in:
parent
33855c4cac
commit
04f77c266e
@ -1,5 +1,8 @@
|
||||
# 最新动态
|
||||
|
||||
2023/05/25
|
||||
* 修改widget的xoffset 或 yoffset != 0时widget\_is\_point\_in结果不正确的问题(感谢朝泽提供补丁)
|
||||
|
||||
2023/05/24
|
||||
* 完善编译脚本(感谢朝泽提供补丁)
|
||||
* 导出assest\_manager\_build\_assest\_filename函数(感谢福明提供补丁)
|
||||
|
@ -4076,8 +4076,10 @@ bool_t widget_is_point_in(widget_t* widget, xy_t x, xy_t y, bool_t is_local) {
|
||||
point_t p = {x, y};
|
||||
return_value_if_fail(widget != NULL, FALSE);
|
||||
|
||||
if (!is_local) {
|
||||
widget_to_local(widget, &p);
|
||||
if (!is_local && widget->parent != NULL) {
|
||||
widget_to_local(widget->parent, &p);
|
||||
p.x -= widget->x;
|
||||
p.y -= widget->y;
|
||||
}
|
||||
|
||||
if (widget->vt->is_point_in != NULL) {
|
||||
|
Loading…
Reference in New Issue
Block a user