Fix page focus not focusing objects the same way when moving up or down the page
@@ -303,9 +303,9 @@ void lv_page_focus(lv_obj_t * page, lv_obj_t * obj, uint16_t anim_time)
else if((obj_h <= page_h && bot_err > 0) ||
(obj_h > page_h && top_err >= bot_err)) {
/*Calculate a new position and let some space below*/
- scrlable_y = -obj_y;
- scrlable_y += page_h - obj_h;
+ scrlable_y = -(obj_y + style_scrl->body.padding.ver + style->body.padding.ver);
scrlable_y -= style_scrl->body.padding.ver;
+ scrlable_y += page_h - obj_h;
} else {
/*Already in focus*/
return;
