summaryrefslogtreecommitdiff
path: root/src/lib/elementary/efl_ui_spin_button.c
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-05 17:44:36 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-07-08 19:56:37 +0200
commiteaeb67e5718dbb5b8cef471fc08204968c5736a2 (patch)
tree54a97b3c5d624a8ceee09ea3c230fc992c31608e /src/lib/elementary/efl_ui_spin_button.c
parentc72ccdadfd0e57c4e15def02a7b199d3caad92ba (diff)
efl_ui_spin_button: change entry to button before changing value
doing this in pressed is kind of weird, if you are on a touchscreen, missclick, and move the finger away, the entry is already transformed, which is weird, this fixes that. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9226
Diffstat (limited to 'src/lib/elementary/efl_ui_spin_button.c')
-rw-r--r--src/lib/elementary/efl_ui_spin_button.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/lib/elementary/efl_ui_spin_button.c b/src/lib/elementary/efl_ui_spin_button.c
index 4c7aaf2..ebdf2ca 100644
--- a/src/lib/elementary/efl_ui_spin_button.c
+++ b/src/lib/elementary/efl_ui_spin_button.c
@@ -29,8 +29,6 @@ static const char PART_NAME_INC_BUTTON[] = "inc_button";
29static void 29static void
30_inc_dec_button_clicked_cb(void *data, const Efl_Event *event); 30_inc_dec_button_clicked_cb(void *data, const Efl_Event *event);
31static void 31static void
32_inc_dec_button_pressed_cb(void *data, const Efl_Event *event);
33static void
34_entry_activated_cb(void *data, const Efl_Event *event); 32_entry_activated_cb(void *data, const Efl_Event *event);
35static void 33static void
36_entry_focus_changed_cb(void *data, const Efl_Event *event); 34_entry_focus_changed_cb(void *data, const Efl_Event *event);
@@ -40,7 +38,6 @@ _access_increment_decrement_info_say(Evas_Object *obj, Eina_Bool is_incremented)
40EFL_CALLBACKS_ARRAY_DEFINE(_inc_dec_button_cb, 38EFL_CALLBACKS_ARRAY_DEFINE(_inc_dec_button_cb,
41 { EFL_UI_EVENT_CLICKED, _inc_dec_button_clicked_cb}, 39 { EFL_UI_EVENT_CLICKED, _inc_dec_button_clicked_cb},
42 { EFL_UI_AUTOREPEAT_EVENT_REPEATED, _inc_dec_button_clicked_cb}, 40 { EFL_UI_AUTOREPEAT_EVENT_REPEATED, _inc_dec_button_clicked_cb},
43 { EFL_UI_EVENT_PRESSED, _inc_dec_button_pressed_cb}
44 ); 41 );
45 42
46static void 43static void
@@ -416,6 +413,8 @@ _inc_dec_button_clicked_cb(void *data, const Efl_Event *event)
416{ 413{
417 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(data, MY_CLASS); 414 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(data, MY_CLASS);
418 415
416 if (sd->entry_visible) _entry_value_apply(data);
417
419 sd->inc_val = sd->inc_button == event->object ? EINA_TRUE : EINA_FALSE; 418 sd->inc_val = sd->inc_button == event->object ? EINA_TRUE : EINA_FALSE;
420 _spin_value(data); 419 _spin_value(data);
421 420
@@ -423,17 +422,6 @@ _inc_dec_button_clicked_cb(void *data, const Efl_Event *event)
423 _access_increment_decrement_info_say(data, EINA_TRUE); 422 _access_increment_decrement_info_say(data, EINA_TRUE);
424} 423}
425 424
426
427static void
428_inc_dec_button_pressed_cb(void *data, const Efl_Event *event)
429{
430 Efl_Ui_Spin_Button_Data *sd = efl_data_scope_get(data, MY_CLASS);
431
432 sd->inc_val = sd->inc_button == event->object ? EINA_TRUE : EINA_FALSE;
433
434 if (sd->entry_visible) _entry_value_apply(data);
435}
436
437static void 425static void
438_text_button_focus_changed_cb(void *data, const Efl_Event *event) 426_text_button_focus_changed_cb(void *data, const Efl_Event *event)
439{ 427{