[scroller] fixed that focus doesn't move by page
authorHosang Kim <hosang12.kim@samsung.com>
Thu, 23 May 2013 08:53:29 +0000 (17:53 +0900)
committerSungho Kwak <sungho1.kwak@samsung.com>
Wed, 12 Jun 2013 05:12:51 +0000 (14:12 +0900)
Change-Id: I01672e5c6c65275dd75d5207d80b4224f9f917a0

src/lib/elm_interface_scrollable.c
src/lib/elm_widget.c

index 205dbd8..fe9e31f 100644 (file)
@@ -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);
index fe46a6e..3b97ae6 100644 (file)
@@ -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;