mirror of
https://github.com/lvgl/lvgl.git
synced 2025-01-21 06:53:01 +08:00
[#809] Fixed scroll focus when object is out of the page in twi sides.
This commit is contained in:
parent
3425f29130
commit
07e9fc4ccf
@ -499,7 +499,7 @@ void lv_page_focus(lv_obj_t * page, const lv_obj_t * obj, uint16_t anim_time)
|
|||||||
scrlable_y += page_h - obj_h;
|
scrlable_y += page_h - obj_h;
|
||||||
}
|
}
|
||||||
/*Out of the page on the left*/
|
/*Out of the page on the left*/
|
||||||
else if((obj_w <= page_w && left_err > 0) ||
|
if((obj_w <= page_w && left_err > 0) ||
|
||||||
(obj_w > page_w && left_err < right_err)) {
|
(obj_w > page_w && left_err < right_err)) {
|
||||||
/*Calculate a new position and let some space above*/
|
/*Calculate a new position and let some space above*/
|
||||||
scrlable_x = -(obj_x - style_scrl->body.padding.ver - style->body.padding.ver);
|
scrlable_x = -(obj_x - style_scrl->body.padding.ver - style->body.padding.ver);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user