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

fix(scroll): fix scroll to view to the left

fixes #3158
This commit is contained in:
Gabor Kiss-Vamosi 2022-03-18 14:10:27 +01:00
parent ca17c204d0
commit 7c74f6556a

View File

@ -746,7 +746,7 @@ static void scroll_area_into_view(const lv_area_t * area, lv_obj_t * child, lv_p
x_scroll = left_diff;
/*Do not let scrolling in*/
lv_coord_t sl = lv_obj_get_scroll_left(parent);
if(sl + x_scroll > 0) x_scroll = 0;
if(sl - x_scroll < 0) x_scroll = 0;
}
else if(right_diff > 0) {
x_scroll = -right_diff;