seoz pushed a commit to branch master.

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

commit 00988d51f0b0d02ecab12e5ba43629eb74b02a79
Author: Daniel Juyung Seo <[email protected]>
Date:   Tue Dec 3 23:49:30 2013 +0900

    elm_interface_scrollable.c: fix scroller page flick calculation roundup 
routine.
    
    When the offset is not bigger than 0 && abs(offset) is not smaller than 
dx(or dy), round up routine could have mis-calculation bug.
    It should substract one value more to get a proper round up result.
    For example, when x = 1440, offset = -2160, dx = 360, x should become 720 
but round up routine made it 1440.
    Because it was rounded up from 1080 to 1440. It should be rounded down from 
1079 to 720.
    
    Special thanks to Hosang Kim for the help.
    
    Signed-off-by: Daniel Juyung Seo <[email protected]>
    Signed-off-by: Hosang Kim <[email protected]>
---
 src/lib/elm_interface_scrollable.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/lib/elm_interface_scrollable.c 
b/src/lib/elm_interface_scrollable.c
index 2d249a5..b9b6a2e 100644
--- a/src/lib/elm_interface_scrollable.c
+++ b/src/lib/elm_interface_scrollable.c
@@ -2127,7 +2127,7 @@ 
_elm_scroll_page_x_get(Elm_Scrollable_Smart_Interface_Data *sid,
         if (offset > 0)
           x += (abs(offset) < dx ? offset : dx);
         else
-          x += (abs(offset) < dx ? offset : -dx);
+          x += (abs(offset) < dx ? offset : -(dx + 1));
      }
 
    if (sid->pagesize_h > 0)
@@ -2167,7 +2167,7 @@ 
_elm_scroll_page_y_get(Elm_Scrollable_Smart_Interface_Data *sid,
         if (offset > 0)
           y += (abs(offset) < dy ? offset : dy);
         else
-          y += (abs(offset) < dy ? offset : -dy);
+          y += (abs(offset) < dy ? offset : -(dy + 1));
      }
 
    if (sid->pagesize_v > 0)

-- 


Reply via email to