fix hscrollable_invalidate

This commit is contained in:
xianjimli 2019-07-27 17:55:01 +08:00
parent ad1711b705
commit 6acb71114f

View File

@ -221,11 +221,11 @@ ret_t hscrollable_invalidate(hscrollable_t* hscrollable, rect_t* r) {
r_self = rect_init(0, 0, widget->w, widget->h);
r->x += widget->x;
r->x -= hscrollable->xoffset;
*r = rect_intersect(r, &r_self);
r->x += widget->x;
r->y += widget->y;
if (r->w <= 0 || r->h <= 0) {
return RET_OK;
}