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
This commit is contained in:
Carsten Haitzler 2016-08-02 17:30:34 +09:00
parent aad5b8b83e
commit 7a70d41541
5 changed files with 9 additions and 1 deletions

View File

@ -23,6 +23,7 @@ group "Elm_Config" struct {
value "scroll_smooth_start_enable" uchar: 1;
value "scroll_smooth_amount" double: 1.0;
value "scroll_smooth_time_window" double: 0.15;
value "scroll_accel_factor" double: 7.0;
value "focus_autoscroll_mode" uchar: 0;
value "slider_indicator_visible_mode" int: 0;
value "scale" double: 1.0;

View File

@ -23,6 +23,7 @@ group "Elm_Config" struct {
value "scroll_smooth_start_enable" uchar: 1;
value "scroll_smooth_amount" double: 1.0;
value "scroll_smooth_time_window" double: 0.15;
value "scroll_accel_factor" double: 7.0;
value "focus_autoscroll_mode" uchar: 0;
value "slider_indicator_visible_mode" int: 0;
value "scale" double: 1.0;

View File

@ -23,6 +23,7 @@ group "Elm_Config" struct {
value "scroll_smooth_start_enable" uchar: 1;
value "scroll_smooth_amount" double: 1.0;
value "scroll_smooth_time_window" double: 0.15;
value "scroll_accel_factor" double: 7.0;
value "focus_autoscroll_mode" uchar: 0;
value "slider_indicator_visible_mode" int: 0;
value "scale" double: 1.0;

View File

@ -1942,9 +1942,13 @@ _scroll_wheel_post_event_cb(void *data, Evas *e EINA_UNUSED)
double delta_t = (double)(ev->timestamp - sid->last_wheel) / 1000.0;
double mul;
if (delta_t > 0.2) sid->last_wheel_mul = 0.0;
if (delta_t > 0.2) delta_t = 0.2;
mul = 1.0 + (_elm_config->scroll_accel_factor * ((0.2 - delta_t) / 0.2));
if (delta_t < 0.2) d *= mul;
mul = mul * (1.0 + (0.15 * sid->last_wheel_mul));
d *= mul;
sid->last_wheel = ev->timestamp;
sid->last_wheel_mul = mul;
if (!direction)
{
if ((ch > vh) || (cw <= vw)) y += d * sid->step.y;

View File

@ -193,6 +193,7 @@ struct _Elm_Scrollable_Smart_Interface_Data
int page_limit_h, page_limit_v;
int current_calc;
double last_wheel_mul;
unsigned int last_wheel;
unsigned char size_adjust_recurse;