aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_gengrid.c
diff options
context:
space:
mode:
authorAnil Kumar Nahak <ak.nahak@samsung.com>2014-07-21 18:55:55 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2014-07-21 18:55:55 +0900
commit76e33725314b91aef8b20565479235a0286598be (patch)
tree0eb72f77343feda4bbcbe43750c25059b7bdbed3 /legacy/elementary/src/bin/test_gengrid.c
parentelm theme - add blank cursor type in theme (diff)
downloadefl-76e33725314b91aef8b20565479235a0286598be.tar.gz
Focus: first item should be focused when there is no focused/selected item
Summary: First item of widget should be focused when focus comes to the widget for first time. Test Plan: elementary_test -to "Genlist Focus" elementary_test -to "Gengrid Focus" elementary_test -to "List Focus" elementary_test -to "toolbar Focus" Reviewers: seoz Differential Revision: https://phab.enlightenment.org/D1135
Diffstat (limited to 'legacy/elementary/src/bin/test_gengrid.c')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index ba69f37fa2..71b3ba65be 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -1445,6 +1445,13 @@ _gg_focus_item_select_on_focus_disable_changed_cb(void *data EINA_UNUSED,
elm_config_item_select_on_focus_disabled_set(elm_check_state_get(obj));
}
+static void
+_gg_first_item_focus_on_first_focus_in_cb(void *data EINA_UNUSED, Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ elm_config_first_item_focus_on_first_focusin_set(elm_check_state_get(obj));
+}
+
void
test_gengrid_focus(void *data EINA_UNUSED,
Evas_Object *obj EINA_UNUSED,
@@ -1568,6 +1575,16 @@ test_gengrid_focus(void *data EINA_UNUSED,
elm_box_pack_end(bx_opt, ck);
evas_object_show(ck);
+ ck = elm_check_add(bx_opt);
+ elm_object_text_set(ck, "First item focus on first focus in");
+ elm_check_state_set(ck, elm_config_first_item_focus_on_first_focusin_get());
+ evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
+ evas_object_smart_callback_add(ck, "changed",
+ _gg_first_item_focus_on_first_focus_in_cb,
+ NULL);
+ elm_box_pack_end(bx_opt, ck);
+ evas_object_show(ck);
+
// Focus Autoscroll Mode
fr = _focus_autoscroll_mode_frame_create(bx);
elm_box_pack_end(bx, fr);