From 67123cdb7d7fc9f281fd24f3f5086a9afc8820a6 Mon Sep 17 00:00:00 2001 From: Jaehwan Kim Date: Tue, 29 Jan 2013 03:51:58 +0000 Subject: [PATCH] Fix the scroll position is calculated by the size of pan object, not the size of scroller. SVN revision: 83399 --- legacy/elementary/ChangeLog | 4 ++++ legacy/elementary/NEWS | 1 + .../elementary/src/lib/elm_interface_scrollable.c | 15 ++++++++------- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/legacy/elementary/ChangeLog b/legacy/elementary/ChangeLog index 1a8a90519d..10c4d957ce 100644 --- a/legacy/elementary/ChangeLog +++ b/legacy/elementary/ChangeLog @@ -964,3 +964,7 @@ 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/legacy/elementary/NEWS b/legacy/elementary/NEWS index 03da81d7c2..09266a5d43 100644 --- a/legacy/elementary/NEWS +++ b/legacy/elementary/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: ------------------------- diff --git a/legacy/elementary/src/lib/elm_interface_scrollable.c b/legacy/elementary/src/lib/elm_interface_scrollable.c index 9be1b168fc..7cd2750dea 100644 --- a/legacy/elementary/src/lib/elm_interface_scrollable.c +++ b/legacy/elementary/src/lib/elm_interface_scrollable.c @@ -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; }