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:
parent
699f40c9b2
commit
c584586985
@ -515,10 +515,9 @@ static void lv_refr_obj(lv_obj_t * obj, const lv_area_t * mask_ori_p)
|
|||||||
|
|
||||||
/* Redraw the object */
|
/* Redraw the object */
|
||||||
lv_style_t * style = lv_obj_get_style(obj);
|
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);
|
||||||
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*/
|
||||||
//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*/
|
/*Create a new 'obj_mask' without 'ext_size' because the children can't be visible there*/
|
||||||
lv_obj_get_coords(obj, &obj_area);
|
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 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);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -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);
|
lv_draw_shadow(coords, mask, style, opa_scale);
|
||||||
}
|
}
|
||||||
#endif
|
#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);
|
lv_draw_rect_main_mid(coords, mask, style, opa_scale);
|
||||||
|
|
||||||
if(style->body.radius != 0) {
|
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);
|
lv_draw_rect_border_straight(coords, mask, style, opa_scale);
|
||||||
|
|
||||||
if(style->body.radius != 0) {
|
if(style->body.radius != 0) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user