improve paint children

This commit is contained in:
lixianjing 2020-01-13 19:39:33 -08:00
parent ed2c65dc0a
commit a0c05e37ef

View File

@ -85,21 +85,21 @@ ret_t widget_on_paint_children_default(widget_t* widget, canvas_t* c) {
return_value_if_fail(widget != NULL && c != NULL, RET_BAD_PARAMS);
WIDGET_FOR_EACH_CHILD_BEGIN(widget, iter, i)
int32_t left = c->ox + iter->x;
int32_t top = c->oy + iter->y;
int32_t bottom = top + iter->h;
int32_t right = left + iter->w;
if (!iter->visible) {
iter->dirty = FALSE;
continue;
}
/* int32_t left = c->ox + iter->x;
int32_t top = c->oy + iter->y;
int32_t bottom = top + iter->h;
int32_t right = left + iter->w;
if (left > c->clip_right || right < c->clip_left || top > c->clip_bottom ||
bottom < c->clip_top) {
iter->dirty = FALSE;
continue;
}
}*/
widget_paint(iter, c);
WIDGET_FOR_EACH_CHILD_END();