if rtl mode is set, current_page_get api will return page number by
substracting by result of last_page_get api to reverse x axis.
but if content size is not a integer multiple of page size,
(which means there is a partial size of the page)
current_page_get api returns a little bit large value.
this commit reverse x axis before calculation logic to unify a kind of
basis of axis.
@tizen_fix
Change-Id: I8a48d52829a8dc9d2660a1a77b44f42587459711
Signed-off-by: Wonki Kim <wonki_.kim@samsung.com>
_elm_interface_scrollable_current_page_get(Eo *obj EINA_UNUSED, Elm_Scrollable_Smart_Interface_Data *sid, int *pagenumber_h, int *pagenumber_v)
{
Evas_Coord x, y;
- Evas_Coord last_x;
eo_do(sid->obj, elm_interface_scrollable_content_pos_get(&x, &y));
- eo_do(sid->obj, elm_interface_scrollable_last_page_get(&last_x, 0));
+
+ // TIZEN_ONLY(20170110): Unify basis of calculation of current_page_get logic on both rtl & ltr
+ if (sid->is_mirrored)
+ x = _elm_scroll_x_mirrored_get(sid->obj, x);
+ // END
if (pagenumber_h)
{
else
*pagenumber_v = 0;
}
-
- if (sid->is_mirrored && pagenumber_h)
- *pagenumber_h = last_x - *pagenumber_h;
}
EOLIAN static void