From: Mike Blumenkrantz Date: Fri, 31 Jan 2020 14:55:06 +0000 (-0500) Subject: efl/gesture: use new config value for thumbscroll friction X-Git-Tag: submit/tizen/20200217.221032~37 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=7216d71f3a3d1f4638adcb36200e0ad565502a88;p=platform%2Fupstream%2Fefl.git efl/gesture: use new config value for thumbscroll friction the old one used here is marked deprecated Reviewed-by: Marcel Hollerbach Differential Revision: https://phab.enlightenment.org/D11263 --- diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c index ebaf042..90ecee6 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c @@ -41,7 +41,7 @@ _momentum_set(Eo *obj, Evas_Coord dy = v2.y - v1.y; int dt = t2 - t1; Eina_Value *tf, *tmt; - double thumbscroll_friction, thumbscroll_momentum_threshold; + double thumbscroll_momentum_friction, thumbscroll_momentum_threshold; if (dt > 0) { @@ -51,15 +51,15 @@ _momentum_set(Eo *obj, vel = sqrt((velx * velx) + (vely * vely)); - tf = _recognizer_config_get(obj, "thumbscroll_friction"); - if (tf) eina_value_get(tf, &thumbscroll_friction); - else thumbscroll_friction = THUMBSCROLL_FRICTION; + tf = _recognizer_config_get(obj, "thumbscroll_momentum_friction"); + if (tf) eina_value_get(tf, &thumbscroll_momentum_friction); + else thumbscroll_momentum_friction = THUMBSCROLL_FRICTION; tmt = _recognizer_config_get(obj, "thumbscroll_momentum_threshold"); if (tmt) eina_value_get(tmt, &thumbscroll_momentum_threshold); else thumbscroll_momentum_threshold = THUMBSCROLL_MOMENTUM_THRESHOLD; - if ((thumbscroll_friction > 0.0) && + if ((thumbscroll_momentum_friction > 0.0) && (vel > thumbscroll_momentum_threshold)) /* report * momentum */ { diff --git a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c index d223a97..d1ea879 100644 --- a/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c +++ b/src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c @@ -26,7 +26,7 @@ _momentum_set(Eo *obj, Evas_Coord dy = v2.y - v1.y; int dt = t2 - t1; Eina_Value *tf, *tmt; - double thumbscroll_friction, thumbscroll_momentum_threshold; + double thumbscroll_momentum_friction, thumbscroll_momentum_threshold; if (dt > 0) { @@ -36,15 +36,15 @@ _momentum_set(Eo *obj, vel = sqrt((velx * velx) + (vely * vely)); - tf = _recognizer_config_get(obj, "thumbscroll_friction"); - if (tf) eina_value_get(tf, &thumbscroll_friction); - else thumbscroll_friction = THUMBSCROLL_FRICTION; + tf = _recognizer_config_get(obj, "thumbscroll_momentum_friction"); + if (tf) eina_value_get(tf, &thumbscroll_momentum_friction); + else thumbscroll_momentum_friction = THUMBSCROLL_FRICTION; tmt = _recognizer_config_get(obj, "thumbscroll_momentum_threshold"); if (tmt) eina_value_get(tmt, &thumbscroll_momentum_threshold); else thumbscroll_momentum_threshold = THUMBSCROLL_MOMENTUM_THRESHOLD; - if ((thumbscroll_friction > 0.0) && + if ((thumbscroll_momentum_friction > 0.0) && (vel > thumbscroll_momentum_threshold)) /* report * momentum */ {