Fix the scroll position is calculated by the size of pan object, not the size of...
authorJaehwan Kim <jae.hwan.kim.neo@gmail.com>
Tue, 29 Jan 2013 04:59:40 +0000 (04:59 +0000)
committerJaehwan Kim <jae.hwan.kim.neo@gmail.com>
Tue, 29 Jan 2013 04:59:40 +0000 (04:59 +0000)
SVN revision: 83405

ChangeLog
NEWS
src/lib/elm_interface_scrollable.c

index 4fc8846c262ddaaddcc69bf02ef24cef135834e2..ec5a515aadfa2d626cde35a129cd3429c3f74641 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2013-01-23  WooHyun Jung
 
         * In _timer_cb of elm_notify, access to sd should be forbidden after smart_callback_call is called.
+
+2013-01-29  Jaehwan Kim
+
+        * Fix the scroll position is calculated by the size of pan object, not the size of scroller.
diff --git a/NEWS b/NEWS
index 91a07a0c33d4db54643a689d49e7103aa8330f31..fa78773eee36e93a935f615987d801795fd85d6e 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -9,6 +9,7 @@ Fixes:
    * When string in entry is changed, access to sd should be forbidden after smart_callback_call is called.
    * Fix memory leak of the ctxpopup and callback function to be ctxpopup obj is delivered to.
    * In _timer_cb of elm_notify, access to sd should be forbidden after smart_callback_call is called.
+   * Fix the scroll position is calculated by the size of pan object, not the size of scroller.
 
 
 Elementary 1.7.5
index 4251a9e1e86023bfaccffdc20cdfe2aa82e42bc2..4778f6517aae80f2db744f520370e16e41e6144f 100644 (file)
@@ -2919,26 +2919,27 @@ _elm_scroll_mouse_move_event_cb(void *data,
                               }
                          }
                        {
-                          Evas_Coord minx, miny;
+                          Evas_Coord minx, miny, mx, my;
 
                           psd->api->pos_min_get(sid->pan_obj, &minx, &miny);
+                          psd->api->pos_max_get(sid->pan_obj, &mx, &my);
                           if (y < miny)
                             y += (miny - y) *
                               _elm_config->thumbscroll_border_friction;
-                          else if (sid->content_info.h <= sid->h)
+                          else if (my <= 0)
                             y += (sid->down.sy - y) *
                               _elm_config->thumbscroll_border_friction;
-                          else if ((sid->content_info.h - sid->h + miny) < y)
-                            y += (sid->content_info.h - sid->h + miny - y) *
+                          else if ((my + miny) < y)
+                            y += (my + miny - y) *
                               _elm_config->thumbscroll_border_friction;
                           if (x < minx)
                             x += (minx - x) *
                               _elm_config->thumbscroll_border_friction;
-                          else if (sid->content_info.w <= sid->w)
+                          else if (mx <= 0)
                             x += (sid->down.sx - x) *
                               _elm_config->thumbscroll_border_friction;
-                          else if ((sid->content_info.w - sid->w + minx) < x)
-                            x += (sid->content_info.w - sid->w + minx - x) *
+                          else if ((mx + minx) < x)
+                            x += (mx + minx - x) *
                               _elm_config->thumbscroll_border_friction;
                        }