fix color bleeding on border drawing

Fixes https://forum.lvgl.io/t/border-dont-cover-calendar/3029/4
This commit is contained in:
Gabor Kiss-Vamosi
2020-08-23 07:44:29 +02:00
parent 35e09885fb
commit c0f6ff4d42
4 changed files with 6 additions and 1 deletions

View File

@@ -3801,7 +3801,7 @@ static lv_design_res_t lv_obj_design(lv_obj_t * obj, const lv_area_t * clip_area
lv_draw_rect_dsc_init(&draw_dsc);
/*If the border is drawn later disable loading its properties*/
if(lv_obj_get_style_border_post(obj, LV_OBJ_PART_MAIN)) {
draw_dsc.border_opa = LV_OPA_TRANSP;
draw_dsc.border_post = 1;
}
lv_obj_init_draw_rect_dsc(obj, LV_OBJ_PART_MAIN, &draw_dsc);

View File

@@ -391,6 +391,7 @@ LV_ATTRIBUTE_FAST_MEM static void draw_border(const lv_area_t * coords, const lv
if(dsc->border_opa <= LV_OPA_MIN) return;
if(dsc->border_width == 0) return;
if(dsc->border_side == LV_BORDER_SIDE_NONE) return;
if(dsc->border_post) return;
int32_t coords_w = lv_area_get_width(coords);
int32_t coords_h = lv_area_get_height(coords);

View File

@@ -41,6 +41,7 @@ typedef struct {
lv_style_int_t border_side;
lv_opa_t border_opa;
lv_blend_mode_t border_blend_mode;
uint8_t border_post :1; /*There is a border it will be drawn later. */
/*Outline*/
lv_color_t outline_color;