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

minor fixes

This commit is contained in:
Gabor Kiss-Vamosi 2021-04-21 12:30:37 +02:00
parent 6c863cabb7
commit fb0481cec0
2 changed files with 7 additions and 0 deletions

View File

@ -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;

View File

@ -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);