1
0
mirror of https://github.com/lvgl/lvgl.git synced 2025-01-28 07:03:00 +08:00

fix(switch): fix knob overflow on right edge (#3674)

Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
_VIFEXTech 2022-09-09 05:21:16 +08:00 committed by GitHub
parent f52fb6f47d
commit 3812f6cc85
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -191,7 +191,7 @@ static void draw_main(lv_event_t * e)
lv_area_t knob_area;
knob_area.x1 = obj->coords.x1 + anim_value_x;
knob_area.x2 = knob_area.x1 + knob_size;
knob_area.x2 = knob_area.x1 + (knob_size > 0 ? knob_size - 1 : 0);
knob_area.y1 = obj->coords.y1;
knob_area.y2 = obj->coords.y2;