diff --git a/lv_core/lv_refr.c b/lv_core/lv_refr.c index 93a81c34c..766c6e2e9 100644 --- a/lv_core/lv_refr.c +++ b/lv_core/lv_refr.c @@ -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); + } } diff --git a/lv_draw/lv_draw_rect.c b/lv_draw/lv_draw_rect.c index b62ccab51..5b4ef1665 100644 --- a/lv_draw/lv_draw_rect.c +++ b/lv_draw/lv_draw_rect.c @@ -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) {