oopsie too.
SVN revision: 60165
value "thumbscroll_border_friction" double: 0.5;
value "scroll_smooth_amount" double: 1.0;
value "scroll_smooth_history_weight" double: 0.3;
- value "scroll_smooth_future_time" double: 0.033;
+ value "scroll_smooth_future_time" double: 0.0;
+ value "scroll_smooth_time_window" double: 0.15;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
value "thumbscroll_border_friction" double: 0.5;
value "scroll_smooth_amount" double: 0.0;
value "scroll_smooth_history_weight" double: 0.3;
- value "scroll_smooth_future_time" double: 0.033;
+ value "scroll_smooth_future_time" double: 0.0;
+ value "scroll_smooth_time_window" double: 0.15;
value "scale" double: 1.0;
value "bgpixmap" int: 0;
value "compositing" int: 1;
elm_app_compile_bin_dir_set(PACKAGE_BIN_DIR);
elm_app_compile_data_dir_set(PACKAGE_DATA_DIR);
- printf("my prefix: %s\n", elm_app_prefix_dir_get());
-
- printf("elm test data in %s\n", elm_app_data_dir_get());
/* if called with a single argument try to autorun a test with
* the same name as the given param
* ex: elementary_test "Box Vert 2" */
ELM_CONFIG_VAL(D, T, scroll_smooth_amount, T_DOUBLE);
ELM_CONFIG_VAL(D, T, scroll_smooth_history_weight, T_DOUBLE);
ELM_CONFIG_VAL(D, T, scroll_smooth_future_time, T_DOUBLE);
+ ELM_CONFIG_VAL(D, T, scroll_smooth_time_window, T_DOUBLE);
ELM_CONFIG_VAL(D, T, scale, T_DOUBLE);
ELM_CONFIG_VAL(D, T, bgpixmap, T_INT);
ELM_CONFIG_VAL(D, T, compositing, T_INT);
_elm_config->scroll_smooth_amount = 1.0;
_elm_config->scroll_smooth_history_weight = 0.3;
_elm_config->scroll_smooth_future_time = 2.0 / 60.0;
+ _elm_config->scroll_smooth_time_window = 0.12;
_elm_config->scale = 1.0;
_elm_config->bgpixmap = 0;
_elm_config->compositing = 1;
if (s) _elm_config->scroll_smooth_history_weight = atof(s);
s = getenv("ELM_SCROLL_SMOOTH_FUTURE_TIME");
if (s) _elm_config->scroll_smooth_future_time = atof(s);
+ s = getenv("ELM_SCROLL_SMOOTH_TIME_WINDOW");
+ if (s) _elm_config->scroll_smooth_time_window = atof(s);
s = getenv("ELM_THEME");
if (s) eina_stringshare_replace(&_elm_config->theme, s);
double scroll_smooth_amount;
double scroll_smooth_history_weight;
double scroll_smooth_future_time;
+ double scroll_smooth_time_window;
double scale;
int bgpixmap;
int compositing;
{
sd->down.hist.est_timestamp_diff =
ecore_loop_time_get() - ((double)ev->timestamp / 1000.0);
+ sd->down.hist.tadd = 0.0;
+ sd->down.hist.dxsum = 0.0;
+ sd->down.hist.dysum = 0.0;
sd->down.now = 1;
sd->down.dragged = 0;
sd->down.dir_x = 0;
// oldest point is sd->down.history[i]
// newset is sd->down.history[0]
dt = t - sd->down.history[i].timestamp;
- if (dt > 0.1)
+ if (dt > _elm_config->scroll_smooth_time_window)
{
i--;
break;
ysum /= (double)i;
tadd = tnow - sd->down.history[0].timestamp + _elm_config->scroll_smooth_future_time;
tadd = tadd - (maxdt / 2);
-#define WEIGHT(n, o, v) n = (o * (v - 1.0)) + (n * v)
+#define WEIGHT(n, o, v) n = (((double)o * (1.0 - v)) + ((double)n * v))
WEIGHT(tadd, sd->down.hist.tadd, _elm_config->scroll_smooth_history_weight);
WEIGHT(dxsum, sd->down.hist.dxsum, _elm_config->scroll_smooth_history_weight);
WEIGHT(dysum, sd->down.hist.dysum, _elm_config->scroll_smooth_history_weight);
sd->down.hist.tadd = tadd;
sd->down.hist.dxsum = dxsum;
sd->down.hist.dysum = dysum;
- fx = WEIGHT(fx, sd->down.hold_x, _elm_config->scroll_smooth_amount);
- fy = WEIGHT(fy, sd->down.hold_y, _elm_config->scroll_smooth_amount);
+ WEIGHT(fx, sd->down.hold_x, _elm_config->scroll_smooth_amount);
+ WEIGHT(fy, sd->down.hold_y, _elm_config->scroll_smooth_amount);
}
}