diff options
author | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-08-02 17:30:34 +0900 |
---|---|---|
committer | Carsten Haitzler (Rasterman) <raster@rasterman.com> | 2016-08-02 17:32:19 +0900 |
commit | 7a70d415411cf9da302f7b1aa678913c42d18ee7 (patch) | |
tree | f1058eb3253e2ca4b4d60cebbab3b308b9fed09d /src | |
parent | aad5b8b83e6542522b1a21972168fca1c2293c1d (diff) |
elm scroller accel was broken by default confgis setting it to 0. fix
now set default wheel scroll accel to 7 as epr the confgi upgrade code
and also improve the acceleration to "rely on itself" and feedback
loop. this is so much better now i can scroll through things in a
whisk with the wheel.
fixes T4263
@fix
Diffstat (limited to 'src')
-rw-r--r-- | src/lib/elementary/elm_interface_scrollable.c | 6 | ||||
-rw-r--r-- | src/lib/elementary/elm_interface_scrollable.h | 1 |
2 files changed, 6 insertions, 1 deletions
diff --git a/src/lib/elementary/elm_interface_scrollable.c b/src/lib/elementary/elm_interface_scrollable.c index a92a503ed4..7c14d31e25 100644 --- a/src/lib/elementary/elm_interface_scrollable.c +++ b/src/lib/elementary/elm_interface_scrollable.c | |||
@@ -1942,9 +1942,13 @@ _scroll_wheel_post_event_cb(void *data, Evas *e EINA_UNUSED) | |||
1942 | double delta_t = (double)(ev->timestamp - sid->last_wheel) / 1000.0; | 1942 | double delta_t = (double)(ev->timestamp - sid->last_wheel) / 1000.0; |
1943 | double mul; | 1943 | double mul; |
1944 | 1944 | ||
1945 | if (delta_t > 0.2) sid->last_wheel_mul = 0.0; | ||
1946 | if (delta_t > 0.2) delta_t = 0.2; | ||
1945 | mul = 1.0 + (_elm_config->scroll_accel_factor * ((0.2 - delta_t) / 0.2)); | 1947 | mul = 1.0 + (_elm_config->scroll_accel_factor * ((0.2 - delta_t) / 0.2)); |
1946 | if (delta_t < 0.2) d *= mul; | 1948 | mul = mul * (1.0 + (0.15 * sid->last_wheel_mul)); |
1949 | d *= mul; | ||
1947 | sid->last_wheel = ev->timestamp; | 1950 | sid->last_wheel = ev->timestamp; |
1951 | sid->last_wheel_mul = mul; | ||
1948 | if (!direction) | 1952 | if (!direction) |
1949 | { | 1953 | { |
1950 | if ((ch > vh) || (cw <= vw)) y += d * sid->step.y; | 1954 | if ((ch > vh) || (cw <= vw)) y += d * sid->step.y; |
diff --git a/src/lib/elementary/elm_interface_scrollable.h b/src/lib/elementary/elm_interface_scrollable.h index 21e17ffa97..f2167267ab 100644 --- a/src/lib/elementary/elm_interface_scrollable.h +++ b/src/lib/elementary/elm_interface_scrollable.h | |||
@@ -193,6 +193,7 @@ struct _Elm_Scrollable_Smart_Interface_Data | |||
193 | int page_limit_h, page_limit_v; | 193 | int page_limit_h, page_limit_v; |
194 | int current_calc; | 194 | int current_calc; |
195 | 195 | ||
196 | double last_wheel_mul; | ||
196 | unsigned int last_wheel; | 197 | unsigned int last_wheel; |
197 | 198 | ||
198 | unsigned char size_adjust_recurse; | 199 | unsigned char size_adjust_recurse; |