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

minor fix

This commit is contained in:
Gabor Kiss-Vamosi 2021-04-21 12:34:41 +02:00
parent 4417ee9d91
commit 36a699fbe4

View File

@ -916,15 +916,19 @@ 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*/
/*With snapping the content can't be scrolled in*/
if(lv_obj_get_scroll_snap_y(obj) == LV_SCROLL_SNAP_NONE) {
lv_coord_t st = lv_obj_get_scroll_top(obj);
lv_coord_t sb = lv_obj_get_scroll_bottom(obj);
if(sb < 0 && st > 0) {
sb = LV_MIN(st, -sb);
lv_obj_scroll_by(obj, 0, sb, LV_ANIM_OFF);
}
}
if(lv_obj_get_scroll_snap_x(obj) == LV_SCROLL_SNAP_NONE) {
lv_coord_t sl = lv_obj_get_scroll_left(obj);
lv_coord_t sr = lv_obj_get_scroll_right(obj);
if(lv_obj_get_base_dir(obj) != LV_BIDI_DIR_RTL) {
@ -940,6 +944,7 @@ static void layout_update_core(lv_obj_t * obj)
lv_obj_scroll_by(obj, sl, 0, LV_ANIM_OFF);
}
}
}
if(lv_obj_get_child_cnt(obj) > 0) {
uint32_t layout_id = lv_obj_get_style_layout(obj, LV_PART_MAIN);