BigW Consortium Gitlab

Commit 0ddfa4c8 by Gabor

lv_rect: fix a bug with light draw when radius is LV_RECT_CIRCLE

parent d553dcf3
......@@ -342,9 +342,16 @@ static void lv_rect_draw_light(lv_obj_t * rect, const area_t * mask)
memcpy(&light_style, style, sizeof(lv_rects_t));
light_style.empty = 1;
light_style.bwidth = light_size;
light_style.round = style->round + light_size + 1;
light_style.round = style->round;
if(light_style.round == LV_RECT_CIRCLE) {
light_style.round = MATH_MIN(lv_obj_get_width(rect), lv_obj_get_height(rect));
}
light_style.round += light_size + 1;
light_style.bcolor = style->lcolor;
light_style.bopa = 100;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment