1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-14 06:42:58 +08:00

lv_refr/draw: enable the drawing even with body.opa == LV_OPA_TRANSP

E.g. labels don't care with body paramters
This commit is contained in:
Gabor Kiss-Vamosi 2018-11-21 14:00:19 +01:00
parent 699f40c9b2
commit c584586985
2 changed files with 7 additions and 9 deletions

View File

@ -515,10 +515,9 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
/* Redraw the object */
lv_style_t * style = lv_obj_get_style(obj);
if(style->body.opa != LV_OPA_TRANSP) {
obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN);
//tick_wait_ms(100); /*DEBUG: Wait after every object draw to see the order of drawing*/
}
obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_MAIN);
//tick_wait_ms(100); /*DEBUG: Wait after every object draw to see the order of drawing*/
/*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/
lv_obj_get_coords(obj, &obj_area);
@ -547,8 +546,7 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
}
/* If all the children are redrawn make 'post draw' design */
if(style->body.opa != LV_OPA_TRANSP) {
obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST);
}
obj->design_func(obj, &obj_ext_mask, LV_DESIGN_DRAW_POST);
}
}

View File

@ -71,7 +71,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty
lv_draw_shadow(coords, mask, style, opa_scale);
}
#endif
if(style->body.empty == 0) {
if(style->body.empty == 0 && style->body.opa >= LV_OPA_MIN) {
lv_draw_rect_main_mid(coords, mask, style, opa_scale);
if(style->body.radius != 0) {
@ -79,7 +79,7 @@ void lv_draw_rect(const lv_area_t * coords, const lv_area_t * mask, const lv_sty
}
}
if(style->body.border.width != 0 && style->body.border.part != LV_BORDER_NONE) {
if(style->body.border.width != 0 && style->body.border.part != LV_BORDER_NONE && style->body.border.opa >= LV_OPA_MIN) {
lv_draw_rect_border_straight(coords, mask, style, opa_scale);
if(style->body.radius != 0) {