summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2013-12-03 23:49:30 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-12-05 16:37:45 +0900
commitf87ad6c9b81402b02563b93e7fe78d621419ed3f (patch)
tree805dc4ca1a87d8a5813722f1682112d189fd752f /src
parentba1381c427275cb6cee97ec9d2e7e5a829f4ffa9 (diff)
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 <juyung.seo@samsung.com> Signed-off-by: Hosang Kim <hosang12.kim@samsung.com>
Diffstat (limited to 'src')
-rw-r--r--src/lib/elm_interface_scrollable.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/elm_interface_scrollable.c b/src/lib/elm_interface_scrollable.c
index 866734772..9d31eb4d1 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,
2127 if (offset > 0) 2127 if (offset > 0)
2128 x += (abs(offset) < dx ? offset : dx); 2128 x += (abs(offset) < dx ? offset : dx);
2129 else 2129 else
2130 x += (abs(offset) < dx ? offset : -dx); 2130 x += (abs(offset) < dx ? offset : -(dx + 1));
2131 } 2131 }
2132 2132
2133 if (sid->pagesize_h > 0) 2133 if (sid->pagesize_h > 0)
@@ -2167,7 +2167,7 @@ _elm_scroll_page_y_get(Elm_Scrollable_Smart_Interface_Data *sid,
2167 if (offset > 0) 2167 if (offset > 0)
2168 y += (abs(offset) < dy ? offset : dy); 2168 y += (abs(offset) < dy ? offset : dy);
2169 else 2169 else
2170 y += (abs(offset) < dy ? offset : -dy); 2170 y += (abs(offset) < dy ? offset : -(dy + 1));
2171 } 2171 }
2172 2172
2173 if (sid->pagesize_v > 0) 2173 if (sid->pagesize_v > 0)