Jee-Yong Um <conr2d@gmail.com>
Ji-In Moon <jiin.moon@samsung.com>
Subodh Kumar <s7158.kumar@samsung.com>
+Kumar Navneet <k.navneet@samsung.com>
+Godly T Alias <godly.talias@samsung.com>
elm_spinner_label_format_set(sp, "%1.1f units");
elm_spinner_step_set(sp, 1.3);
elm_spinner_wrap_set(sp, EINA_TRUE);
- elm_spinner_min_max_set(sp, -50.0, 250.0);
+ elm_spinner_min_max_set(sp, -5000.0, 5000.0);
evas_object_size_hint_align_set(sp, EVAS_HINT_FILL, 0.5);
evas_object_size_hint_weight_set(sp, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
evas_object_smart_callback_add(sp, "spinner,drag,start",
* @author Jae Yong Hwang <j_yong.hwang@@samsung.com>
* @author Kabeer Khan <kabeer.khan@@samsung.com>
* @author yinsc <shouchen.yin@@samsung.com>
- * @author Subodh Kumar <s7158.kumar@samsung.com>
+ * @author Subodh Kumar <s7158.kumar@@samsung.com>
+ * @author Kumar Navneet <k.navneet@@samsung.com>
+ * @author Godly T Alias <godly.talias@@samsung.com>
*
* Please contact <enlightenment-devel@lists.sourceforge.net> to get in
* contact with the developers and maintainers.
else
eo_do((Eo *)wd->resize_obj,
edje_obj_part_drag_value_get("elm.dragable.slider", &pos, NULL));
+ if (sd->drag_prev_pos != 0)
+ sd->drag_val_step = pow((pos - sd->drag_prev_pos), 2);
+ else
+ sd->drag_val_step = 1;
+
- delta = pos * sd->step * _elm_config->scale;
+ delta = sd->drag_val_step * sd->step * _elm_config->scale;
+ if (pos < sd->drag_prev_pos) delta *= -1;
+ sd->drag_prev_pos = pos;
/* If we are on rtl mode, change the delta to be negative on such changes */
if (elm_widget_mirrored_get(obj)) delta *= -1;
- if (_value_set(data, sd->drag_start_val + delta)) _label_write(data);
+ if (_value_set(data, sd->val + delta)) _label_write(data);
sd->dragging = 1;
}
{
ELM_SPINNER_DATA_GET(data, sd);
- sd->drag_start_val = sd->val;
+ sd->drag_prev_pos = 0;
+ sd->drag_val_step = 1;
evas_object_smart_callback_call(obj, SIG_DRAG_START, NULL);
}
ELM_SPINNER_DATA_GET(data, sd);
ELM_WIDGET_DATA_GET_OR_RETURN(data, wd);
- sd->drag_start_val = 0;
+ sd->drag_prev_pos = 0;
+ sd->drag_val_step = 1;
edje_object_part_drag_value_set
(wd->resize_obj, "elm.dragable.slider", 0.0, 0.0);
const char *label;
double val, val_min, val_max, val_base;
double step; /**< step for the value change. 1 by default. */
- double drag_start_val; /**< spinner value on drag start.
- this is reset to 0 when drag stops. */
+ double drag_prev_pos, drag_val_step;
double spin_speed, interval, first_interval;
int round;
Ecore_Timer *delay_change_timer; /**< a timer for a delay,changed smart callback */