diff --git a/src/core/lv_indev_scroll.c b/src/core/lv_indev_scroll.c index 6e5c9c915..97b1f6802 100644 --- a/src/core/lv_indev_scroll.c +++ b/src/core/lv_indev_scroll.c @@ -437,6 +437,9 @@ static lv_coord_t find_snap_point_x(const lv_obj_t * obj, lv_coord_t min, lv_coo case LV_SCROLL_SNAP_CENTER: x_child = child->coords.x1 + lv_area_get_width(&child->coords) / 2; x_parent = obj->coords.x1 + pad_left + (lv_area_get_width(&obj->coords) - pad_left - pad_right) / 2; + break; + default: + continue; } x_child += ofs; @@ -487,6 +490,9 @@ static lv_coord_t find_snap_point_y(const lv_obj_t * obj, lv_coord_t min, lv_coo case LV_SCROLL_SNAP_CENTER: y_child = child->coords.y1 + lv_area_get_height(&child->coords) / 2; y_parent = obj->coords.y1 + pad_top + (lv_area_get_height(&obj->coords) - pad_top - pad_bottom) / 2; + break; + default: + continue; } y_child += ofs; diff --git a/src/core/lv_obj_pos.c b/src/core/lv_obj_pos.c index faf28c66d..c5b93be45 100644 --- a/src/core/lv_obj_pos.c +++ b/src/core/lv_obj_pos.c @@ -916,6 +916,7 @@ static void layout_update_core(lv_obj_t * obj) lv_obj_refr_size(obj); lv_obj_refr_pos(obj); + if() /*Be sure the bottom side is not remains scrolled in*/ lv_coord_t st = lv_obj_get_scroll_top(obj); lv_coord_t sb = lv_obj_get_scroll_bottom(obj);