aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDaniel Juyung Seo <juyung.seo@samsung.com>2013-11-28 17:06:39 +0900
committerDaniel Juyung Seo <juyung.seo@samsung.com>2013-11-28 17:07:44 +0900
commit26b6320f46478f8d1a6abbf76fd20144e369664f (patch)
treeb998d65624c40990856c5ad8c325b6840bdc64d6
parentelm_index.c: removed unused empty function. (diff)
downloadelementary-26b6320f46478f8d1a6abbf76fd20144e369664f.tar.gz
elm_spinner.c: support mouse wheel in spinner.
Spinner didn't work with mouse wheel which is a bug. This fixes https://phab.enlightenment.org/T587.
-rw-r--r--ChangeLog4
-rw-r--r--NEWS1
-rw-r--r--src/lib/elm_spinner.c18
3 files changed, 22 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 0f7d397e8..6703d4773 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1756,3 +1756,7 @@
2013-11-25 ChunEon Park (Hermet)
* image: fix the elm_image_prescale_set() to work properly.
+
+2013-11-28 Daniel Juyung Seo (SeoZ)
+
+ * spinner: fix mouse wheel support.
diff --git a/NEWS b/NEWS
index 740858c44..c99ebce1e 100644
--- a/NEWS
+++ b/NEWS
@@ -157,6 +157,7 @@ Improvements:
* Popup: Change the behavior of adding/removing buttons dynamically. User defined button's position is kept.
* Fileselector: Monitor and update changes of selected path automatically while EIO is working.
* Hoversel: Added focus support on hoversel items.
+ * Spinner: Support mouse wheel.
Fixes:
* Now elm_datetime_field_limit_set() can set year limits wihtout problems.
diff --git a/src/lib/elm_spinner.c b/src/lib/elm_spinner.c
index 2021f3aa8..e7c881b4a 100644
--- a/src/lib/elm_spinner.c
+++ b/src/lib/elm_spinner.c
@@ -431,8 +431,10 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
Evas_Object *src = va_arg(*list, Evas_Object *);
Evas_Callback_Type type = va_arg(*list, Evas_Callback_Type);
- Evas_Event_Key_Down *ev = va_arg(*list, void *);
+ void *event_info = va_arg(*list, void *);
+ Evas_Event_Key_Down *ev = event_info;
Eina_Bool *ret = va_arg(*list, Eina_Bool *);
+ Evas_Event_Mouse_Wheel *mev;
if (ret) *ret = EINA_FALSE;
(void) src;
@@ -490,6 +492,20 @@ _elm_spinner_smart_event(Eo *obj, void *_pd EINA_UNUSED, va_list *list)
goto success;
}
+ else if (type == EVAS_CALLBACK_MOUSE_WHEEL)
+ {
+ mev = event_info;
+ if (mev->z < 0)
+ {
+ _val_inc_start(obj);
+ elm_layout_signal_emit(obj, "elm,right,anim,activate", "elm");
+ }
+ else
+ {
+ _val_dec_start(obj);
+ elm_layout_signal_emit(obj, "elm,left,anim,activate", "elm");
+ }
+ }
return;