mirror of
https://github.com/lvgl/lvgl.git
synced 2025-02-04 07:13:00 +08:00
fix(switch): fix knob overflow on right edge (#3674)
Co-authored-by: pengyiqiang <pengyiqiang@xiaomi.com>
This commit is contained in:
parent
f52fb6f47d
commit
3812f6cc85
@ -191,7 +191,7 @@ static void draw_main(lv_event_t * e)
|
|||||||
|
|
||||||
lv_area_t knob_area;
|
lv_area_t knob_area;
|
||||||
knob_area.x1 = obj->coords.x1 + anim_value_x;
|
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.y1 = obj->coords.y1;
|
||||||
knob_area.y2 = obj->coords.y2;
|
knob_area.y2 = obj->coords.y2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user