diff options
| author | Rafael Antognolli <rafael.antognolli@linux.intel.com> | 2013-03-01 18:24:05 (GMT) |
|---|---|---|
| committer | Rafael Antognolli <rafael.antognolli@linux.intel.com> | 2013-03-01 18:24:05 (GMT) |
| commit | 0d6443dfaeb4612196e87ec6445a20d0328e2336 (patch) | |
| tree | 36fecae1d3a51ee18b9e50a617a8ae3cc6a2c340 | |
| parent | [access] check whether a highlight object is NULL or not (diff) | |
spinner: Fix initial value of the spinner.
The size should remain the same after the first mouse move and then be
adjusted accordingly.
Fixes #1403.
Patch by: "Brian J. Lovin" <brian.j.lovin@intel.com>
| -rw-r--r-- | src/lib/elm_spinner.c | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c index 9bf6598..56ba3f5 100644 --- a/src/lib/elm_spinner.c +++ b/src/lib/elm_spinner.c @@ -170,7 +170,7 @@ _drag_cb(void *data, (wd->resize_obj, "elm.dragable.slider", &pos, NULL); offset = sd->step * _elm_config->scale; - delta = (pos - sd->drag_start_pos) * offset; + delta = 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); @@ -183,14 +183,9 @@ _drag_start_cb(void *data, const char *emission __UNUSED__, const char *source __UNUSED__) { - double pos; - ELM_SPINNER_DATA_GET(data, sd); - Elm_Widget_Smart_Data *wd = eo_data_get(data, ELM_OBJ_WIDGET_CLASS); - edje_object_part_drag_value_get - (wd->resize_obj, "elm.dragable.slider", &pos, NULL); - sd->drag_start_pos = pos; + sd->drag_start_pos = sd->val; } static void |
