From 910651dafe2845578932bae0e04d2c5dac06841f Mon Sep 17 00:00:00 2001 From: Hosang Kim Date: Thu, 23 May 2013 17:53:29 +0900 Subject: [PATCH] [scroller] fixed that focus doesn't move by page Change-Id: I01672e5c6c65275dd75d5207d80b4224f9f917a0 --- src/lib/elm_interface_scrollable.c | 8 ++++++++ src/lib/elm_widget.c | 11 ----------- 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c index 205dbd8..fe9e31f 100644 --- a/src/lib/elm_interface_scrollable.c +++ b/src/lib/elm_interface_scrollable.c @@ -1676,6 +1676,14 @@ _elm_scroll_content_region_show(Evas_Object *obj, sid->wy = y; sid->ww = w; sid->wh = h; + if (_paging_is_enabled(sid)) + { + sid->wx = x = (int)(x / sid->pagesize_h) * sid->pagesize_h; + sid->ww = w = sid->pagesize_h; + sid->wy = y = (int)(y / sid->pagesize_v) * sid->pagesize_v; + sid->wh = h = sid->pagesize_v; + } + if (_elm_scroll_content_region_show_internal(obj, &x, &y, w, h)) { _elm_scroll_content_pos_set(obj, x, y, EINA_TRUE); diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c index fe46a6e..3b97ae6 100644 --- a/src/lib/elm_widget.c +++ b/src/lib/elm_widget.c @@ -891,20 +891,9 @@ _elm_widget_focus_region_show(const Evas_Object *obj) o = elm_widget_parent_get(o); continue; } - else if ((px < ox) && ((px + pw) < (ox + w))) - { - // if object is over the viewport to the x axis. - x += w - pw; - } - else if ((py < oy) && ((py + ph) < (oy + h))) - { - // if object is over the viewport to the y axis. - y += h - ph; - } ELM_SCROLLABLE_IFACE_GET(o, s_iface); s_iface->content_pos_get(o, &rx, &ry); - s_iface->content_viewport_size_get(o, &w, &h); x += rx + ox - px; y += ry + oy - py; -- 2.7.4