summaryrefslogtreecommitdiff
path: root/src/lib/evas
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2020-01-31 09:55:06 -0500
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2020-02-14 09:20:39 +0100
commit23f772b43449823c59de4db44fbac21501a3fed4 (patch)
tree5a76c9f38ff13ab8eb40145ebc307bd54465191a /src/lib/evas
parenta59956680d9b71a7ab40efdaa5d5082141c26dba (diff)
efl/gesture: use new config value for thumbscroll friction
the old one used here is marked deprecated Reviewed-by: Marcel Hollerbach <mail@marcel-hollerbach.de> Differential Revision: https://phab.enlightenment.org/D11263
Diffstat (limited to 'src/lib/evas')
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_flick.c10
-rw-r--r--src/lib/evas/gesture/efl_canvas_gesture_recognizer_momentum.c10
2 files changed, 10 insertions, 10 deletions
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 ebaf042f0a..90ecee66bd 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,
41 Evas_Coord dy = v2.y - v1.y; 41 Evas_Coord dy = v2.y - v1.y;
42 int dt = t2 - t1; 42 int dt = t2 - t1;
43 Eina_Value *tf, *tmt; 43 Eina_Value *tf, *tmt;
44 double thumbscroll_friction, thumbscroll_momentum_threshold; 44 double thumbscroll_momentum_friction, thumbscroll_momentum_threshold;
45 45
46 if (dt > 0) 46 if (dt > 0)
47 { 47 {
@@ -51,15 +51,15 @@ _momentum_set(Eo *obj,
51 51
52 vel = sqrt((velx * velx) + (vely * vely)); 52 vel = sqrt((velx * velx) + (vely * vely));
53 53
54 tf = _recognizer_config_get(obj, "thumbscroll_friction"); 54 tf = _recognizer_config_get(obj, "thumbscroll_momentum_friction");
55 if (tf) eina_value_get(tf, &thumbscroll_friction); 55 if (tf) eina_value_get(tf, &thumbscroll_momentum_friction);
56 else thumbscroll_friction = THUMBSCROLL_FRICTION; 56 else thumbscroll_momentum_friction = THUMBSCROLL_FRICTION;
57 57
58 tmt = _recognizer_config_get(obj, "thumbscroll_momentum_threshold"); 58 tmt = _recognizer_config_get(obj, "thumbscroll_momentum_threshold");
59 if (tmt) eina_value_get(tmt, &thumbscroll_momentum_threshold); 59 if (tmt) eina_value_get(tmt, &thumbscroll_momentum_threshold);
60 else thumbscroll_momentum_threshold = THUMBSCROLL_MOMENTUM_THRESHOLD; 60 else thumbscroll_momentum_threshold = THUMBSCROLL_MOMENTUM_THRESHOLD;
61 61
62 if ((thumbscroll_friction > 0.0) && 62 if ((thumbscroll_momentum_friction > 0.0) &&
63 (vel > thumbscroll_momentum_threshold)) /* report 63 (vel > thumbscroll_momentum_threshold)) /* report
64 * momentum */ 64 * momentum */
65 { 65 {
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 d223a976f3..d1ea879ae7 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,
26 Evas_Coord dy = v2.y - v1.y; 26 Evas_Coord dy = v2.y - v1.y;
27 int dt = t2 - t1; 27 int dt = t2 - t1;
28 Eina_Value *tf, *tmt; 28 Eina_Value *tf, *tmt;
29 double thumbscroll_friction, thumbscroll_momentum_threshold; 29 double thumbscroll_momentum_friction, thumbscroll_momentum_threshold;
30 30
31 if (dt > 0) 31 if (dt > 0)
32 { 32 {
@@ -36,15 +36,15 @@ _momentum_set(Eo *obj,
36 36
37 vel = sqrt((velx * velx) + (vely * vely)); 37 vel = sqrt((velx * velx) + (vely * vely));
38 38
39 tf = _recognizer_config_get(obj, "thumbscroll_friction"); 39 tf = _recognizer_config_get(obj, "thumbscroll_momentum_friction");
40 if (tf) eina_value_get(tf, &thumbscroll_friction); 40 if (tf) eina_value_get(tf, &thumbscroll_momentum_friction);
41 else thumbscroll_friction = THUMBSCROLL_FRICTION; 41 else thumbscroll_momentum_friction = THUMBSCROLL_FRICTION;
42 42
43 tmt = _recognizer_config_get(obj, "thumbscroll_momentum_threshold"); 43 tmt = _recognizer_config_get(obj, "thumbscroll_momentum_threshold");
44 if (tmt) eina_value_get(tmt, &thumbscroll_momentum_threshold); 44 if (tmt) eina_value_get(tmt, &thumbscroll_momentum_threshold);
45 else thumbscroll_momentum_threshold = THUMBSCROLL_MOMENTUM_THRESHOLD; 45 else thumbscroll_momentum_threshold = THUMBSCROLL_MOMENTUM_THRESHOLD;
46 46
47 if ((thumbscroll_friction > 0.0) && 47 if ((thumbscroll_momentum_friction > 0.0) &&
48 (vel > thumbscroll_momentum_threshold)) /* report 48 (vel > thumbscroll_momentum_threshold)) /* report
49 * momentum */ 49 * momentum */
50 { 50 {