forked from enlightenment/enlightenment
parent
15e862becb
commit
a537c5c741
|
@ -18,6 +18,7 @@ struct _E_Smart_Data
|
|||
double val, val_min, val_max, val_range, step_size;
|
||||
int reversed, step_count, horizontal;
|
||||
int direction;
|
||||
int changing;
|
||||
const char *format;
|
||||
Evas_Coord minw, minh;
|
||||
Ecore_Timer *set_timer;
|
||||
|
@ -253,7 +254,10 @@ _e_smart_set_timer(void *data)
|
|||
if (pos < 0.0) pos = 0.0;
|
||||
else if (pos > 1.0) pos = 1.0;
|
||||
if (sd->reversed) pos = 1.0 - pos;
|
||||
sd->changing++;
|
||||
edje_object_part_drag_value_set(sd->edje_obj, "e.dragable.slider", pos, pos);
|
||||
edje_object_message_signal_process(sd->edje_obj);
|
||||
sd->changing--;
|
||||
sd->set_timer = NULL;
|
||||
return ECORE_CALLBACK_CANCEL;
|
||||
}
|
||||
|
@ -350,6 +354,7 @@ _e_smart_signal_cb_drag(void *data, Evas_Object *obj __UNUSED__, const char *emi
|
|||
E_Smart_Data *sd = data;
|
||||
double pval = sd->val;
|
||||
|
||||
if (sd->changing) return;
|
||||
_e_smart_value_fetch(sd);
|
||||
_e_smart_value_limit(sd);
|
||||
_e_smart_format_update(sd);
|
||||
|
@ -363,6 +368,7 @@ _e_smart_signal_cb_drag_start(void *data, Evas_Object *obj __UNUSED__, const cha
|
|||
E_Smart_Data *sd = data;
|
||||
double pval = sd->val;
|
||||
|
||||
if (sd->changing) return;
|
||||
_e_smart_value_fetch(sd);
|
||||
_e_smart_value_limit(sd);
|
||||
_e_smart_format_update(sd);
|
||||
|
@ -376,6 +382,7 @@ _e_smart_signal_cb_drag_stop(void *data, Evas_Object *obj __UNUSED__, const char
|
|||
E_Smart_Data *sd = data;
|
||||
double pval = sd->val;
|
||||
|
||||
if (sd->changing) return;
|
||||
_e_smart_value_fetch(sd);
|
||||
_e_smart_value_limit(sd);
|
||||
_e_smart_format_update(sd);
|
||||
|
|
|
@ -177,9 +177,8 @@ _e_wid_fprev_preview_video_position(E_Widget_Data *wd, Evas_Object *obj, void *e
|
|||
|
||||
tot = emotion_object_play_length_get(obj);
|
||||
if (!tot) return;
|
||||
t = emotion_object_position_get(obj) / emotion_object_play_length_get(obj) * 100;
|
||||
if (t - wd->vid_pct < 1.0) return;
|
||||
e_widget_slider_value_double_set(wd->o_preview_time, wd->vid_pct = t);
|
||||
wd->vid_pct = t = (emotion_object_position_get(obj) * 100.0) / emotion_object_play_length_get(obj);
|
||||
e_widget_slider_value_double_set(wd->o_preview_time, t);
|
||||
}
|
||||
|
||||
static void
|
||||
|
@ -191,10 +190,15 @@ _e_wid_fprev_preview_video_opened(E_Widget_Data *wd, Evas_Object *obj, void *eve
|
|||
static void
|
||||
_e_wid_fprev_preview_video_change(void *data, Evas_Object *obj)
|
||||
{
|
||||
double pos;
|
||||
double pos, tot;
|
||||
|
||||
tot = emotion_object_play_length_get(data);
|
||||
t = emotion_object_position_get(data);
|
||||
e_widget_slider_value_double_get(obj, &pos);
|
||||
emotion_object_position_set(data, pos / 100. * emotion_object_play_length_get(data));
|
||||
pos = (pos * tot) / 100.0;
|
||||
t = pos - t;
|
||||
if (t < 0.0) t = -t;
|
||||
if (t > 0.25) emotion_object_position_set(data, pos);
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Reference in New Issue