summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-17 20:20:52 +0900
committerDaniel Juyung Seo <seojuyung2@gmail.com>2014-05-17 20:20:52 +0900
commit102e2ff2219470f152769bd564cd07fcf753f5a1 (patch)
tree70b0874ddce1092b31559416f2512126904f2dcd
parent0eb95143cbcb5f0ed04a059ed29d9050e7caef75 (diff)
focus: apply the focus API change during the development phase.
This fixes the commit 422b8717 which was pushed to master without considering the API change.
-rw-r--r--src/bin/test_focus.c23
-rw-r--r--src/lib/elm_widget.c2
2 files changed, 7 insertions, 18 deletions
diff --git a/src/bin/test_focus.c b/src/bin/test_focus.c
index d1742b5b3..b45022995 100644
--- a/src/bin/test_focus.c
+++ b/src/bin/test_focus.c
@@ -3,6 +3,8 @@
3#endif 3#endif
4#include <Elementary.h> 4#include <Elementary.h>
5 5
6Evas_Object * _focus_autoscroll_mode_frame_create(Evas_Object *parent);
7
6/**** focus 1 ****/ 8/**** focus 1 ****/
7 9
8static Eina_Bool 10static Eina_Bool
@@ -715,14 +717,6 @@ _focus_highlight_clip_disable_changed_cb(void *data EINA_UNUSED,
715} 717}
716 718
717static void 719static void
718_focus_bring_in_changed_cb(void *data EINA_UNUSED,
719 Evas_Object *obj,
720 void *event_info EINA_UNUSED)
721{
722 elm_config_focus_auto_scroll_bring_in_enabled_set(elm_check_state_get(obj));
723}
724
725static void
726_horizontal_btn(void *data, Evas_Object *obj, void *event_info EINA_UNUSED) 720_horizontal_btn(void *data, Evas_Object *obj, void *event_info EINA_UNUSED)
727{ 721{
728 Evas_Object *box_btn = data; 722 Evas_Object *box_btn = data;
@@ -747,7 +741,6 @@ test_focus3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
747 elm_win_focus_highlight_enabled_set(win, EINA_TRUE); 741 elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
748 elm_win_focus_highlight_animate_set(win, EINA_TRUE); 742 elm_win_focus_highlight_animate_set(win, EINA_TRUE);
749 elm_win_focus_highlight_style_set(win, "glow"); 743 elm_win_focus_highlight_style_set(win, "glow");
750 evas_object_resize(win, 320, 400);
751 744
752 box = elm_box_add(win); 745 box = elm_box_add(win);
753 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND); 746 evas_object_size_hint_weight_set(box, EVAS_HINT_EXPAND, EVAS_HINT_EXPAND);
@@ -806,14 +799,9 @@ test_focus3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
806 _focus_highlight_clip_disable_changed_cb, 799 _focus_highlight_clip_disable_changed_cb,
807 NULL); 800 NULL);
808 801
809 ck = elm_check_add(box); 802 // Focus Autoscroll Mode
810 elm_object_text_set(ck, "Focus Auto scroll bring in enable"); 803 fr = _focus_autoscroll_mode_frame_create(box);
811 evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0); 804 elm_box_pack_end(box, fr);
812 evas_object_smart_callback_add(ck, "changed", _focus_bring_in_changed_cb,
813 NULL);
814 elm_check_state_set(ck, elm_config_focus_auto_scroll_bring_in_enabled_get());
815 elm_box_pack_end(box, ck);
816 evas_object_show(ck);
817 805
818 ck = elm_check_add(box); 806 ck = elm_check_add(box);
819 elm_object_text_set(ck, "Horizontal Mode"); 807 elm_object_text_set(ck, "Horizontal Mode");
@@ -821,6 +809,7 @@ test_focus3(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_in
821 elm_box_pack_end(box, ck); 809 elm_box_pack_end(box, ck);
822 evas_object_show(ck); 810 evas_object_show(ck);
823 811
812 evas_object_resize(win, 320, 500);
824 evas_object_show(win); 813 evas_object_show(win);
825} 814}
826 815
diff --git a/src/lib/elm_widget.c b/src/lib/elm_widget.c
index 18ef77879..4c079e010 100644
--- a/src/lib/elm_widget.c
+++ b/src/lib/elm_widget.c
@@ -3795,7 +3795,7 @@ _elm_widget_focus_highlight_geometry_get(Eo *obj, Elm_Widget_Smart_Data *sd, Eva
3795 evas_object_geometry_get(obj, x, y, w, h); 3795 evas_object_geometry_get(obj, x, y, w, h);
3796 elm_widget_focus_highlight_focus_part_geometry_get(sd->resize_obj, x, y, w, h); 3796 elm_widget_focus_highlight_focus_part_geometry_get(sd->resize_obj, x, y, w, h);
3797 3797
3798 if (!_elm_config->focus_auto_scroll_bring_in_enable) 3798 if (_elm_config->focus_autoscroll_mode != ELM_FOCUS_AUTOSCROLL_MODE_BRING_IN)
3799 return; 3799 return;
3800 3800
3801 while (scroller) 3801 while (scroller)