From 47423ab72064309d5a8e0824ab9f3761e11666e8 Mon Sep 17 00:00:00 2001 From: Mike Blumenkrantz Date: Mon, 22 Jul 2019 15:57:39 +0200 Subject: [PATCH] efl_ui/scroll_manager: mimic feel of legacy scroller Summary: previously this used a hard linear scroll with a fixed animation time for mouse wheel events, resulting in an unnatural scroll feel due to abrupt animation termination using the decelerate interpolator improves this, and we should be using the config to determine animation speed Depends on D9347 Reviewers: bu5hm4n, segfaultxavi Reviewed By: segfaultxavi Subscribers: cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D9354 --- src/lib/elementary/efl_ui_scroll_manager.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/lib/elementary/efl_ui_scroll_manager.c b/src/lib/elementary/efl_ui_scroll_manager.c index 83794319bd..63654f3eba 100644 --- a/src/lib/elementary/efl_ui_scroll_manager.c +++ b/src/lib/elementary/efl_ui_scroll_manager.c @@ -756,7 +756,9 @@ _scroll_wheel_post_event_go(Efl_Ui_Scroll_Manager_Data *sd, int x, int y) else { cur = efl_ui_pan_position_get(sd->pan_obj); - _scroll_manager_scrollto_animator_add(sd, cur.x, cur.y, x, y, 0.5, 0.5, INTERP_LINEAR); + _scroll_manager_scrollto_animator_add(sd, cur.x, cur.y, x, y, + _elm_config->bring_in_scroll_friction, + _elm_config->bring_in_scroll_friction, INTERP_DECEL); } }