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 03:51:58 +0000 (03:51 +0000)
committerJaehwan Kim <jae.hwan.kim.neo@gmail.com>
Tue, 29 Jan 2013 03:51:58 +0000 (03:51 +0000)
SVN revision: 83399

ChangeLog
NEWS
src/lib/elm_interface_scrollable.c

index 1a8a905..10c4d95 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
 2013-01-28  Shinwoo Kim
 
         * [access] The read next/prev message does not move focus but move highlight only. the focus moves when the activate message is detected.
+
+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 03da81d..09266a5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -141,6 +141,7 @@ Removals:
      to deprecation. Thus, people using that (unstable) API will have
      to adapt themselves.
    * Deprecate elm_label_slide_set(), elm_label_slide_get().
+   * Fix the scroll position is calculated by the size of pan object, not the size of scroller.
 
 Changes since Elementary 1.0.0:
 -------------------------
index 9be1b16..7cd2750 100644 (file)
@@ -2910,26 +2910,27 @@ _elm_scroll_mouse_move_event_cb(void *data,
                               }
                          }
                        {
-                          Evas_Coord minx, miny;
+                          Evas_Coord minx, miny, mx, my;
 
                           eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(&minx, &miny));
+                          eo_do(sid->pan_obj, elm_obj_pan_pos_min_get(&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;
                        }