summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/elm_interface_scrollable.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c
index a9f79d27bb..e9312796dc 100644
--- a/src/lib/elementary/elm_interface_scrollable.c
+++ b/src/lib/elementary/elm_interface_scrollable.c
@@ -1844,6 +1844,7 @@ static void
1844_elm_scroll_wanted_region_set(Evas_Object *obj) 1844_elm_scroll_wanted_region_set(Evas_Object *obj)
1845{ 1845{
1846 Evas_Coord ww, wh, wx; 1846 Evas_Coord ww, wh, wx;
1847 Evas_Coord mx = 0, my = 0;
1847 1848
1848 ELM_SCROLL_IFACE_DATA_GET_OR_RETURN(obj, sid); 1849 ELM_SCROLL_IFACE_DATA_GET_OR_RETURN(obj, sid);
1849 1850
@@ -1872,11 +1873,13 @@ _elm_scroll_wanted_region_set(Evas_Object *obj)
1872 wh = sid->wh; 1873 wh = sid->wh;
1873 } 1874 }
1874 1875
1875 wx += (sid->content_info.w - sid->prev_cw) * sid->gravity_x; 1876 elm_obj_pan_pos_max_get(sid->pan_obj, &mx, &my);
1876 sid->wy += (sid->content_info.h - sid->prev_ch) * sid->gravity_y; 1877
1878 wx += (mx - sid->prev_cw) * sid->gravity_x;
1879 sid->wy += (my - sid->prev_ch) * sid->gravity_y;
1877 1880
1878 sid->prev_cw = sid->content_info.w; 1881 sid->prev_cw = mx;
1879 sid->prev_ch = sid->content_info.h; 1882 sid->prev_ch = my;
1880 1883
1881 elm_interface_scrollable_content_region_set(obj, wx, sid->wy, ww, wh); 1884 elm_interface_scrollable_content_region_set(obj, wx, sid->wy, ww, wh);
1882} 1885}
@@ -4441,8 +4444,7 @@ _elm_interface_scrollable_gravity_set(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_
4441{ 4444{
4442 sid->gravity_x = x; 4445 sid->gravity_x = x;
4443 sid->gravity_y = y; 4446 sid->gravity_y = y;
4444 sid->prev_cw = sid->content_info.w; 4447 elm_obj_pan_pos_max_get(sid->pan_obj, &sid->prev_cw, &sid->prev_ch);
4445 sid->prev_ch = sid->content_info.h;
4446} 4448}
4447 4449
4448EOLIAN static void 4450EOLIAN static void