When dragged, spinners reset to 0 and then start dragging in a user's view.
But shouldn't it start from the value that is set last time?
For example, if I set a spinner's value to 20, then I drag it, it appears to 
start dragging from 0.


I looked into the code, finding that it JUST work as I said:


static void
_drag_cb(void *data,
         Evas_Object *_obj __UNUSED__,
         const char *emission __UNUSED__,
         const char *source __UNUSED__)
{
   double pos = 0.0, offset, delta;
   Evas_Object *obj = data;


   ELM_SPINNER_DATA_GET(obj, sd);
   Elm_Widget_Smart_Data *wd = eo_data_get(obj, ELM_OBJ_WIDGET_CLASS);


   if (sd->entry_visible) return;
   edje_object_part_drag_value_get
     (wd->resize_obj, "elm.dragable.slider", &pos, NULL);


   offset = sd->step * _elm_config->scale;
!!!   delta = (pos - sd->drag_start_pos) * offset;
   /* 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_pos + delta)) _label_write(data);
   sd->dragging = 1;
}


I don't think implementing "start drag from current value" is difficult. Just 
store a drag_start_value in _drag_start_cb, and change the !!!-marked line to 
delta = (pos - sd->drag_start_pos) * offset + sd->drag_start_value;

So, why not? Isn't it a better user experience?


--
Where there is a hacker, there is art.
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
enlightenment-devel mailing list
enlightenment-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to