From: Daniel Juyung Seo Date: Mon, 3 Sep 2012 06:20:47 +0000 (+0000) Subject: elm genlist: Fixed wrong reorder animation. Patch by Bluezery X-Git-Tag: submit/efl/20131021.015827~1826 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=f0989a7e39d3822ddaef38d197fd2a2747df9542;p=platform%2Fupstream%2Felementary.git elm genlist: Fixed wrong reorder animation. Patch by Bluezery On Fri, Aug 31, 2012 at 8:50 PM, Bluezery wrote: > Hello, > > Sometimes reorder animation ended incorrectly > You can test & see the problem when background color is black and > genlist item color is white. > I made the added value for animation as difference between old item > position and new item position if difference is below predefined dy. > (y = diff, if diff < dy) So item position can be finally new item > position at last. > Please review this patch. > > Thanks SVN revision: 75950 --- diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index bdec6dc..5cf1039 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -1743,7 +1743,8 @@ _reorder_move_animator_cb(void *data) else y = dy; diff = abs(it->item->old_scrl_y - it->item->scrl_y); - if (diff > it->item->h) y = diff / 2; + if (diff < dy) y = diff; + else if (diff > it->item->h) y = diff / 2; if (it->item->old_scrl_y < it->item->scrl_y) {