From: Jaehwan Kim Date: Mon, 8 Apr 2013 06:16:29 +0000 (+0900) Subject: Fix the scroller show by a page if the page size is set and the region_bring_in or... X-Git-Tag: accepted/tizen/20130607.213307~64 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=51cf48ac103094c900dad3ae427e6ccc63a59615;p=profile%2Fmobile%2Felementary.git Fix the scroller show by a page if the page size is set and the region_bring_in or region_show is called. Change-Id: I15250b55437bff6ca0231de0c4c51de470875766 --- diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index 0eeac33..175aecf 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -33,6 +33,11 @@ ELM_INTERNAL_SMART_SUBCLASS_NEW evas_object_smart_clipped_class_get, _smart_callbacks); static void _elm_pan_content_set(Evas_Object *, Evas_Object *); +static Eina_Bool _paging_is_enabled(Elm_Scrollable_Smart_Interface_Data *sid); +static Evas_Coord +_elm_scroll_page_x_get(Elm_Scrollable_Smart_Interface_Data *sid, int offset); +static Evas_Coord +_elm_scroll_page_y_get(Elm_Scrollable_Smart_Interface_Data *sid, int offset); EAPI const Elm_Pan_Smart_Class * elm_pan_smart_class_get(void) @@ -1600,10 +1605,18 @@ _elm_scroll_content_region_show_internal(Evas_Object *obj, _elm_scroll_wanted_region_set(sid->obj); } - x = nx; + if (_paging_is_enabled(sid)) + { + x = _elm_scroll_page_x_get(sid, nx - px); + y = _elm_scroll_page_y_get(sid, ny - py); + } + else + { + x = nx; + y = ny; + } if ((x + pw) > cw) x = cw - pw; if (x < minx) x = minx; - y = ny; if ((y + ph) > ch) y = ch - ph; if (y < miny) y = miny;