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

fix(draw_outline) do not change the outline_width based on the outline_pad

fixes: #2171
This commit is contained in:
Gabor Kiss-Vamosi 2021-04-12 12:15:31 +02:00
parent 5dc7356f99
commit a6d3eff4db
2 changed files with 5 additions and 6 deletions

View File

@ -1193,11 +1193,10 @@ static void draw_outline(const lv_area_t * coords, const lv_area_t * clip, const
lv_area_t area_outer;
lv_area_copy(&area_outer, &area_inner);
lv_coord_t width = (dsc->outline_pad == 0 ? (dsc->outline_width + 1) : dsc->outline_width);
area_outer.x1 -= width;
area_outer.x2 += width;
area_outer.y1 -= width;
area_outer.y2 += width;
area_outer.x1 -= dsc->outline_width;
area_outer.x2 += dsc->outline_width;
area_outer.y1 -= dsc->outline_width;
area_outer.y2 += dsc->outline_width;
draw_full_border(&area_inner, &area_outer, clip, dsc->radius, true, dsc->outline_color, dsc->outline_opa,
dsc->blend_mode);

View File

@ -32,7 +32,7 @@ static lv_color_t color_secondary_muted;
#define TRANSITION_TIME LV_THEME_DEFAULT_TRANSITON_TIME
#define BORDER_WIDTH LV_DPX(2)
#define OUTLINE_WIDTH LV_DPX(2)
#define OUTLINE_WIDTH LV_DPX(4)
#define PAD_DEF (disp_size == DISP_LARGE ? LV_DPX(24) : disp_size == DISP_MEDIUM ? LV_DPX(20) : LV_DPX(20))
#define PAD_SMALL (disp_size == DISP_LARGE ? LV_DPX(14) : disp_size == DISP_MEDIUM ? LV_DPX(12) : LV_DPX(12))