summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJaehwan Kim <jae.hwan.kim@samsung.com>2013-04-08 13:39:24 +0900
committerJaehwan Kim <jae.hwan.kim@samsung.com>2013-04-08 14:07:58 +0900
commitefe24dd2e076dc7f9d88ca87962a5b6d59619ec2 (patch)
tree268666eeb24e263d014da350235b84a15ec09aa6
parent93041c1ddb850a75b3c8e2bc8afaa4bb460f9d63 (diff)
downloadelementary-efe24dd2e076dc7f9d88ca87962a5b6d59619ec2.tar.gz
Fix the scroller show by a page if the page size is set and the region_bring_in or region_show is called.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/elm_interface_scrollable.c17
3 files changed, 20 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index a72331586..d50b1455e 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -804,3 +804,7 @@
2013-04-08 Jaehwan Kim
* Quit the scroll animator if the scroller don't have a bounce and reach a edge.
+
+2013-04-08 Jaehwan Kim
+
+ * Fix the scroller show by a page if the page size is set and the region_bring_in or region_show is called.
diff --git a/NEWS b/NEWS
index a20fff3b1..0dc370c4e 100644
--- a/NEWS
+++ b/NEWS
@@ -4,6 +4,7 @@ Changes since Elementary 1.7.6:
Fixes:
* Quit the scroll animator if the scroller don't have a bounce and reach a edge.
+ * Fix the scroller show by a page if the page size is set and the region_bring_in or region_show is called.
Elementary 1.7.6
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c
index 42bdeb2b6..ded753bb1 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)
@@ -1602,10 +1607,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;