From 641560d897125a92be4346a11cbb598b6816513a Mon Sep 17 00:00:00 2001 From: raster Date: Thu, 10 Mar 2011 10:25:30 +0000 Subject: [PATCH] From: Jae Hwan Kim Subject: [E-devel] [Patch] elm_smart_scroller_child_region_show_internal In the els_scroller of the elementary, the function "elm_smart_scroller_child_region_show_internal" have a problem. If the parameters "x,y,w,h" have the wrong value like "elm_scroller_region_show(scroller, -300, -300, 900, 900);", the scroller move the position temporarily. The scroller seem to jump. So if the value of the parameter is not valid, it should be changed to valid value. The work is applied already in the function "elm_smart_scroller_region_bring_in". It should be applied in the function "elm_smart_scroller_child_region_show_internal" too. I changed the code like bring_in function. git-svn-id: svn+ssh://svn.enlightenment.org/var/svn/e/trunk/elementary@57666 7cbeb6ba-43b4-40fd-8cce-4c39aea84d33 --- src/lib/els_scroller.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/lib/els_scroller.c b/src/lib/els_scroller.c index 0a4765b..da027eb 100644 --- a/src/lib/els_scroller.c +++ b/src/lib/els_scroller.c @@ -1061,7 +1061,13 @@ _elm_smart_scroller_child_region_show_internal(Evas_Object *obj, Evas_Coord x, E sd->down.pdx = 0; sd->down.pdy = 0; } - elm_smart_scroller_child_pos_set(obj, nx, ny); + x = nx; + if (x < minx) x = minx; + else if ((x + w) > cw) x = cw - w; + y = ny; + if (y < miny) y = miny; + else if ((y + h) > ch) y = ch - h; + elm_smart_scroller_child_pos_set(obj, x, y); } /* Set should be used for calculated positions, for example, when we move -- 2.7.4