hermet pushed a commit to branch master.

http://git.enlightenment.org/core/elementary.git/commit/?id=c8b4d4c4ee3977a56eb9c6ac3021c458776b47ba

commit c8b4d4c4ee3977a56eb9c6ac3021c458776b47ba
Author: ChunEon Park <her...@hermet.pe.kr>
Date:   Thu Oct 10 19:58:01 2013 +0900

    elementary/scroller - fix the scroller to locate the current page correctly 
in case that the scroller is suddenly resized and then the drag couldn't 
capture the page location.
---
 ChangeLog                          | 6 ++++++
 NEWS                               | 1 +
 src/lib/elm_interface_scrollable.c | 7 +++++++
 3 files changed, 14 insertions(+)

diff --git a/ChangeLog b/ChangeLog
index 7891a1b..3e9e5b3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1683,3 +1683,9 @@
 2013-10-08  Daesung Kim (ad960009)
 
         * ctxpopup : fix elm_object_content_unset didn't unpack content from 
box
+
+2013-10-10  ChunEon Park (Hermet)
+
+        * scroller : fix the scroller to locate the current page correctly
+        in case that the scroller is suddenly resized and then the drag
+        couldn't capture the page location.
diff --git a/NEWS b/NEWS
index bff325a..1992150 100644
--- a/NEWS
+++ b/NEWS
@@ -297,6 +297,7 @@ Fixes:
    * elm_player breaks theme due to poor namespacing
    * elm_popup breaks theme due to poor namespacing
    * ctxpopup: fix elm_object_content_unset didn't unpack content from box
+   * scroller : fix the scroller to locate the current page correctly in case 
that the scroller is suddenly resized and then the drag couldn't capture the 
page location.
 
 Removals:
 
diff --git a/src/lib/elm_interface_scrollable.c 
b/src/lib/elm_interface_scrollable.c
index aecb77f..981ff00 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -948,6 +948,13 @@ _elm_scroll_scroll_bar_read_and_update(
    x = _round(vx * (double)mx + minx, 1);
    y = _round(vy * (double)my + miny, 1);
    eo_do(sid->pan_obj, elm_obj_pan_pos_get(&px, &py));
+
+   if (!sid->freeze && _paging_is_enabled(sid))
+     {
+        x = _elm_scroll_page_x_get(sid, x - px, EINA_FALSE);
+        y = _elm_scroll_page_y_get(sid, y - py, EINA_FALSE);
+     }
+
    eo_do(sid->pan_obj, elm_obj_pan_pos_set(x, y));
    if ((px != x) || (py != y))
      {

-- 


Reply via email to