make these friction and config values
SVN revision: 42667
This commit is contained in:
parent
d32071097c
commit
c9036091d4
|
@ -504,6 +504,8 @@ elm_quicklaunch_init(int argc, char **argv)
|
|||
_elm_config->thumbscroll_friction = 1.0;
|
||||
_elm_config->thumbscroll_bounce_friction = 0.5;
|
||||
_elm_config->thumbscroll_bounce_enable = 1;
|
||||
_elm_config->page_scroll_friction = 0.5;
|
||||
_elm_config->zoom_friction = 0.5;
|
||||
_elm_config->scale = 1.0;
|
||||
_elm_config->font_hinting = 2;
|
||||
_elm_config->font_dirs = NULL;
|
||||
|
@ -560,6 +562,10 @@ elm_quicklaunch_init(int argc, char **argv)
|
|||
if (s) _elm_config->thumbscroll_momentum_threshhold = atof(s);
|
||||
s = getenv("ELM_THUMBSCROLL_FRICTION");
|
||||
if (s) _elm_config->thumbscroll_friction = atof(s);
|
||||
s = getenv("ELM_PAGE_SCROLL_FRICTION");
|
||||
if (s) _elm_config->page_scroll_friction = atof(s);
|
||||
s = getenv("ELM_ZOOM_FRICTION");
|
||||
if (s) _elm_config->zoom_friction = atof(s);
|
||||
|
||||
s = getenv("ELM_THEME");
|
||||
if (s) _elm_theme_parse(s);
|
||||
|
|
|
@ -832,7 +832,7 @@ elm_photocam_zoom_set(Evas_Object *obj, int zoom)
|
|||
elm_smart_scroller_child_viewport_size_get(wd->scr, &rw, &rh);
|
||||
wd->size.spos.x = (double)(rx + (rw / 2)) / (double)wd->size.w;
|
||||
wd->size.spos.y = (double)(ry + (rh / 2)) / (double)wd->size.h;
|
||||
wd->t_end = wd->t_start + 0.5;
|
||||
wd->t_end = wd->t_start + _elm_config->zoom_friction;
|
||||
an = wd->zoom_animator;
|
||||
if (!_zoom_anim(obj)) ecore_animator_del(an);
|
||||
if (wd->calc_job) ecore_job_del(wd->calc_job);
|
||||
|
|
|
@ -43,6 +43,8 @@ struct _Elm_Config
|
|||
double thumbscroll_momentum_threshhold;
|
||||
double thumbscroll_friction;
|
||||
double thumbscroll_bounce_friction;
|
||||
double page_scroll_friction;
|
||||
double zoom_friction;
|
||||
int thumbscroll_bounce_enable;
|
||||
double scale;
|
||||
int bgpixmap;
|
||||
|
|
|
@ -1034,11 +1034,11 @@ elm_smart_scroller_region_bring_in(Evas_Object *obj, Evas_Coord x, Evas_Coord y,
|
|||
x = nx;
|
||||
if (x < 0) x = 0;
|
||||
else if ((x + w) > cw) x = cw - w;
|
||||
_smart_scrollto_x(sd, 1.0, x);
|
||||
_smart_scrollto_x(sd, _elm_config->page_scroll_friction, x);
|
||||
y = ny;
|
||||
if (y < 0) y = 0;
|
||||
else if ((y + h) > ch) y = ch - h;
|
||||
_smart_scrollto_y(sd, 1.0, y);
|
||||
_smart_scrollto_y(sd, _elm_config->page_scroll_friction, y);
|
||||
}
|
||||
|
||||
/* local subsystem functions */
|
||||
|
@ -1414,9 +1414,9 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
|
||||
elm_smart_scroller_child_pos_get(sd->smart_obj, &x, &y);
|
||||
pgx = _smart_page_x_get(sd, ox);
|
||||
if (pgx != x) _smart_scrollto_x(sd, 1.0, pgx);
|
||||
if (pgx != x) _smart_scrollto_x(sd, _elm_config->page_scroll_friction, pgx);
|
||||
pgy = _smart_page_y_get(sd, oy);
|
||||
if (pgy != y) _smart_scrollto_y(sd, 1.0, pgy);
|
||||
if (pgy != y) _smart_scrollto_y(sd, _elm_config->page_scroll_friction, pgy);
|
||||
}
|
||||
}
|
||||
else
|
||||
|
@ -1427,9 +1427,9 @@ _smart_event_mouse_up(void *data, Evas *e, Evas_Object *obj, void *event_info)
|
|||
|
||||
elm_smart_scroller_child_pos_get(sd->smart_obj, &x, &y);
|
||||
pgx = _smart_page_x_get(sd, ox);
|
||||
if (pgx != x) _smart_scrollto_x(sd, 1.0, pgx);
|
||||
if (pgx != x) _smart_scrollto_x(sd, _elm_config->page_scroll_friction, pgx);
|
||||
pgy = _smart_page_y_get(sd, oy);
|
||||
if (pgy != y) _smart_scrollto_y(sd, 1.0, pgy);
|
||||
if (pgy != y) _smart_scrollto_y(sd, _elm_config->page_scroll_friction, pgy);
|
||||
}
|
||||
}
|
||||
sd->down.dragged = 0;
|
||||
|
|
Loading…
Reference in New Issue