forked from enlightenment/efl
Misspelling threshhold -> threshold as pointed out by glima.
SVN revision: 53740
This commit is contained in:
parent
a5b772f9a5
commit
dd5b3ae608
|
@ -2,8 +2,8 @@ group "Elm_Config" struct {
|
|||
value "config_version" int: 65537;
|
||||
value "engine" int: 0;
|
||||
value "thumbscroll_enable" uchar: 1;
|
||||
value "thumbscroll_threshhold" int: 24;
|
||||
value "thumbscroll_momentum_threshhold" double: 100.0;
|
||||
value "thumbscroll_threshold" int: 24;
|
||||
value "thumbscroll_momentum_threshold" double: 100.0;
|
||||
value "thumbscroll_friction" double: 1.0;
|
||||
value "thumbscroll_bounce_friction" double: 0.5;
|
||||
value "thumbscroll_bounce_enable" uchar: 1;
|
||||
|
|
|
@ -2,8 +2,8 @@ group "Elm_Config" struct {
|
|||
value "config_version" int: 65537;
|
||||
value "engine" int: 0;
|
||||
value "thumbscroll_enable" uchar: 1;
|
||||
value "thumbscroll_threshhold" int: 24;
|
||||
value "thumbscroll_momentum_threshhold" double: 100.0;
|
||||
value "thumbscroll_threshold" int: 24;
|
||||
value "thumbscroll_momentum_threshold" double: 100.0;
|
||||
value "thumbscroll_friction" double: 1.0;
|
||||
value "thumbscroll_bounce_friction" double: 0.5;
|
||||
value "thumbscroll_bounce_enable" uchar: 1;
|
||||
|
|
|
@ -2,8 +2,8 @@ group "Elm_Config" struct {
|
|||
value "config_version" int: 65537;
|
||||
value "engine" int: 0;
|
||||
value "thumbscroll_enable" uchar: 0;
|
||||
value "thumbscroll_threshhold" int: 4;
|
||||
value "thumbscroll_momentum_threshhold" double: 100.0;
|
||||
value "thumbscroll_threshold" int: 4;
|
||||
value "thumbscroll_momentum_threshold" double: 100.0;
|
||||
value "thumbscroll_friction" double: 1.0;
|
||||
value "thumbscroll_bounce_friction" double: 0.5;
|
||||
value "thumbscroll_bounce_enable" uchar: 0;
|
||||
|
|
|
@ -205,8 +205,8 @@ _desc_init(void)
|
|||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "config_version", config_version, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "engine", engine, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "thumbscroll_enable", thumbscroll_enable, EET_T_UCHAR);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "thumbscroll_threshhold", thumbscroll_threshhold, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "thumbscroll_momentum_threshhold", thumbscroll_momentum_threshhold, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "thumbscroll_threshold", thumbscroll_threshold, EET_T_INT);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "thumbscroll_momentum_threshold", thumbscroll_momentum_threshold, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "thumbscroll_friction", thumbscroll_friction, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "thumbscroll_bounce_friction", thumbscroll_bounce_friction, EET_T_DOUBLE);
|
||||
EET_DATA_DESCRIPTOR_ADD_BASIC(_config_edd, Elm_Config, "page_scroll_friction", page_scroll_friction, EET_T_DOUBLE);
|
||||
|
@ -398,8 +398,8 @@ _config_load(void)
|
|||
_elm_config->config_version = ELM_CONFIG_VERSION;
|
||||
_elm_config->engine = ELM_SOFTWARE_X11;
|
||||
_elm_config->thumbscroll_enable = EINA_TRUE;
|
||||
_elm_config->thumbscroll_threshhold = 24;
|
||||
_elm_config->thumbscroll_momentum_threshhold = 100.0;
|
||||
_elm_config->thumbscroll_threshold = 24;
|
||||
_elm_config->thumbscroll_momentum_threshold = 100.0;
|
||||
_elm_config->thumbscroll_friction = 1.0;
|
||||
_elm_config->thumbscroll_bounce_friction = 0.5;
|
||||
_elm_config->page_scroll_friction = 0.5;
|
||||
|
@ -533,10 +533,10 @@ _env_get(void)
|
|||
s = getenv("ELM_THUMBSCROLL_ENABLE");
|
||||
if (s) _elm_config->thumbscroll_enable = !!atoi(s);
|
||||
s = getenv("ELM_THUMBSCROLL_THRESHOLD");
|
||||
if (s) _elm_config->thumbscroll_threshhold = atoi(s);
|
||||
if (s) _elm_config->thumbscroll_threshold = atoi(s);
|
||||
// FIXME: floatformat locale issues here 1.0 vs 1,0 - should just be 1.0
|
||||
s = getenv("ELM_THUMBSCROLL_MOMENTUM_THRESHOLD");
|
||||
if (s) _elm_config->thumbscroll_momentum_threshhold = atof(s);
|
||||
if (s) _elm_config->thumbscroll_momentum_threshold = atof(s);
|
||||
s = getenv("ELM_THUMBSCROLL_FRICTION");
|
||||
if (s) _elm_config->thumbscroll_friction = atof(s);
|
||||
s = getenv("ELM_PAGE_SCROLL_FRICTION");
|
||||
|
|
|
@ -72,8 +72,8 @@ struct _Elm_Config
|
|||
int config_version;
|
||||
int engine;
|
||||
Eina_Bool thumbscroll_enable;
|
||||
int thumbscroll_threshhold;
|
||||
double thumbscroll_momentum_threshhold;
|
||||
int thumbscroll_threshold;
|
||||
double thumbscroll_momentum_threshold;
|
||||
double thumbscroll_friction;
|
||||
double thumbscroll_bounce_friction;
|
||||
double page_scroll_friction;
|
||||
|
|
|
@ -1511,7 +1511,7 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *ev
|
|||
{
|
||||
vel = sqrt((dx * dx) + (dy * dy)) / at;
|
||||
if ((_elm_config->thumbscroll_friction > 0.0) &&
|
||||
(vel > _elm_config->thumbscroll_momentum_threshhold) &&
|
||||
(vel > _elm_config->thumbscroll_momentum_threshold) &&
|
||||
(!sd->freeze))
|
||||
{
|
||||
sd->down.dx = ((double)dx / at);
|
||||
|
@ -1618,8 +1618,8 @@ _smart_onhold_animator(void *data)
|
|||
if (sd->down.onhold_tlast > 0.0)
|
||||
{
|
||||
td = t - sd->down.onhold_tlast;
|
||||
vx = sd->down.onhold_vx * td * (double)_elm_config->thumbscroll_threshhold * 2.0;
|
||||
vy = sd->down.onhold_vy * td * (double)_elm_config->thumbscroll_threshhold * 2.0;
|
||||
vx = sd->down.onhold_vx * td * (double)_elm_config->thumbscroll_threshold * 2.0;
|
||||
vy = sd->down.onhold_vy * td * (double)_elm_config->thumbscroll_threshold * 2.0;
|
||||
elm_smart_scroller_child_pos_get(sd->smart_obj, &ox, &oy);
|
||||
x = ox;
|
||||
y = oy;
|
||||
|
@ -1765,7 +1765,7 @@ _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *
|
|||
if ((sd->one_dir_at_a_time) &&
|
||||
(!((sd->down.dir_x) || (sd->down.dir_y))))
|
||||
{
|
||||
if (x > _elm_config->thumbscroll_threshhold)
|
||||
if (x > _elm_config->thumbscroll_threshold)
|
||||
{
|
||||
if (x > (y * 2))
|
||||
{
|
||||
|
@ -1774,7 +1774,7 @@ _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *
|
|||
dodir++;
|
||||
}
|
||||
}
|
||||
if (y > _elm_config->thumbscroll_threshhold)
|
||||
if (y > _elm_config->thumbscroll_threshold)
|
||||
{
|
||||
if (y > (x * 2))
|
||||
{
|
||||
|
@ -1803,8 +1803,8 @@ _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *
|
|||
{
|
||||
if ((sd->down.dragged) ||
|
||||
(((x * x) + (y * y)) >
|
||||
(_elm_config->thumbscroll_threshhold *
|
||||
_elm_config->thumbscroll_threshhold)))
|
||||
(_elm_config->thumbscroll_threshold *
|
||||
_elm_config->thumbscroll_threshold)))
|
||||
{
|
||||
sd->down.dragged_began = 1;
|
||||
if (!sd->down.dragged)
|
||||
|
@ -1872,35 +1872,35 @@ _smart_event_mouse_move(void *data, Evas *e, Evas_Object *obj __UNUSED__, void *
|
|||
evas_object_geometry_get(sd->event_obj, &ex, &ey, &ew, &eh);
|
||||
x = ev->cur.canvas.x - ex;
|
||||
y = ev->cur.canvas.y - ey;
|
||||
if (x < _elm_config->thumbscroll_threshhold)
|
||||
if (x < _elm_config->thumbscroll_threshold)
|
||||
{
|
||||
if (_elm_config->thumbscroll_threshhold > 0.0)
|
||||
vx = -(double)(_elm_config->thumbscroll_threshhold - x) /
|
||||
_elm_config->thumbscroll_threshhold;
|
||||
if (_elm_config->thumbscroll_threshold > 0.0)
|
||||
vx = -(double)(_elm_config->thumbscroll_threshold - x) /
|
||||
_elm_config->thumbscroll_threshold;
|
||||
else
|
||||
vx = -1.0;
|
||||
}
|
||||
else if (x > (ew - _elm_config->thumbscroll_threshhold))
|
||||
else if (x > (ew - _elm_config->thumbscroll_threshold))
|
||||
{
|
||||
if (_elm_config->thumbscroll_threshhold > 0.0)
|
||||
vx = (double)(_elm_config->thumbscroll_threshhold - (ew - x)) /
|
||||
_elm_config->thumbscroll_threshhold;
|
||||
if (_elm_config->thumbscroll_threshold > 0.0)
|
||||
vx = (double)(_elm_config->thumbscroll_threshold - (ew - x)) /
|
||||
_elm_config->thumbscroll_threshold;
|
||||
else
|
||||
vx = 1.0;
|
||||
}
|
||||
if (y < _elm_config->thumbscroll_threshhold)
|
||||
if (y < _elm_config->thumbscroll_threshold)
|
||||
{
|
||||
if (_elm_config->thumbscroll_threshhold > 0.0)
|
||||
vy = -(double)(_elm_config->thumbscroll_threshhold - y) /
|
||||
_elm_config->thumbscroll_threshhold;
|
||||
if (_elm_config->thumbscroll_threshold > 0.0)
|
||||
vy = -(double)(_elm_config->thumbscroll_threshold - y) /
|
||||
_elm_config->thumbscroll_threshold;
|
||||
else
|
||||
vy = -1.0;
|
||||
}
|
||||
else if (y > (eh - _elm_config->thumbscroll_threshhold))
|
||||
else if (y > (eh - _elm_config->thumbscroll_threshold))
|
||||
{
|
||||
if (_elm_config->thumbscroll_threshhold > 0.0)
|
||||
vy = (double)(_elm_config->thumbscroll_threshhold - (eh - y)) /
|
||||
_elm_config->thumbscroll_threshhold;
|
||||
if (_elm_config->thumbscroll_threshold > 0.0)
|
||||
vy = (double)(_elm_config->thumbscroll_threshold - (eh - y)) /
|
||||
_elm_config->thumbscroll_threshold;
|
||||
else
|
||||
vy = 1.0;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue