antognolli pushed a commit to branch master.
commit 0d6443dfaeb4612196e87ec6445a20d0328e2336
Author: Rafael Antognolli <[email protected]>
Date: Fri Mar 1 15:24:05 2013 -0300
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" <[email protected]>
---
src/lib/elm_spinner.c | 9 ++-------
1 file 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
--
------------------------------------------------------------------------------
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