aboutsummaryrefslogtreecommitdiffstats
path: root/legacy/elementary/src/bin/test_gengrid.c
diff options
context:
space:
mode:
authorYoungbok Shin <youngb.shin@samsung.com>2015-08-05 12:27:11 +0530
committerAmitesh Singh <amitesh.sh@samsung.com>2015-08-05 12:27:11 +0530
commit3fb443df951ed00f1053ef774e5ce48507138cf0 (patch)
tree288fd97f074e9e293534000444c6458e1edcdace /legacy/elementary/src/bin/test_gengrid.c
parentfocus: add del callback always. (diff)
downloadefl-3fb443df951ed00f1053ef774e5ce48507138cf0.tar.gz
focus/list/genlist/gengrid: fix focus highlight issues on list widgets when auto focus enable is on.
Summary: elm_list, elm_genlist widgets are handle focus highlight relying on only elm_widget_focus_highlight_enabled_get() API. The API is not considered about auto focus highlight feature. So, we need to check a flag for auto focus from _elm_config. It resolves https://phab.enlightenment.org/T2555. @fix Test Plan: elementary_test -> List Focus or Genlist Focus Reviewers: raster, cedric, SanghyeonLee, singh.amitesh Reviewed By: SanghyeonLee, singh.amitesh Maniphest Tasks: https://phab.enlightenment.org/T2555 Differential Revision: https://phab.enlightenment.org/D2914
Diffstat (limited to 'legacy/elementary/src/bin/test_gengrid.c')
-rw-r--r--legacy/elementary/src/bin/test_gengrid.c46
1 files changed, 42 insertions, 4 deletions
diff --git a/legacy/elementary/src/bin/test_gengrid.c b/legacy/elementary/src/bin/test_gengrid.c
index ffd4857bcf..93d7f38f0e 100644
--- a/legacy/elementary/src/bin/test_gengrid.c
+++ b/legacy/elementary/src/bin/test_gengrid.c
@@ -1610,6 +1610,22 @@ _gg_focus_focus_move_policy_changed_cb(void *data EINA_UNUSED,
}
static void
+_gg_focus_win_auto_focus_enable_changed(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ elm_config_window_auto_focus_enable_set(elm_check_state_get(obj));
+}
+
+static void
+_gg_focus_win_auto_focus_animate_changed(void *data EINA_UNUSED,
+ Evas_Object *obj,
+ void *event_info EINA_UNUSED)
+{
+ elm_config_window_auto_focus_animate_set(elm_check_state_get(obj));
+}
+
+static void
_gg_focus_focus_highlight_changed_cb(void *data,
Evas_Object *obj,
void *event_info EINA_UNUSED)
@@ -1666,8 +1682,10 @@ test_gengrid_focus(void *data EINA_UNUSED,
int i, n;
win = elm_win_util_standard_add("gengrid-focus", "Gengrid Focus");
- elm_win_focus_highlight_enabled_set(win, EINA_TRUE);
- elm_win_focus_highlight_animate_set(win, EINA_TRUE);
+ elm_config_window_auto_focus_enable_set(EINA_TRUE);
+ elm_config_window_auto_focus_animate_set(EINA_TRUE);
+ elm_win_focus_highlight_enabled_set(win, EINA_FALSE);
+ elm_win_focus_highlight_animate_set(win, EINA_FALSE);
elm_win_autodel_set(win, EINA_TRUE);
bx_horiz = elm_box_add(win);
@@ -1734,10 +1752,30 @@ test_gengrid_focus(void *data EINA_UNUSED,
evas_object_show(bx_opt);
ck = elm_check_add(bx_opt);
- elm_object_text_set(ck, "Focus Highlight");
+ elm_object_text_set(ck, "Window Auto Focus Enable");
+ elm_check_state_set(ck, EINA_TRUE);
+ evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
+ evas_object_smart_callback_add(ck, "changed",
+ _gg_focus_win_auto_focus_enable_changed,
+ NULL);
+ elm_box_pack_end(bx_opt, ck);
+ evas_object_show(ck);
+
+ ck = elm_check_add(bx_opt);
+ elm_object_text_set(ck, "Window Auto Focus Animate");
elm_check_state_set(ck, EINA_TRUE);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
evas_object_smart_callback_add(ck, "changed",
+ _gg_focus_win_auto_focus_animate_changed,
+ NULL);
+ elm_box_pack_end(bx_opt, ck);
+ evas_object_show(ck);
+
+ ck = elm_check_add(bx_opt);
+ elm_object_text_set(ck, "Focus Highlight");
+ elm_check_state_set(ck, EINA_FALSE);
+ evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
+ evas_object_smart_callback_add(ck, "changed",
_gg_focus_focus_highlight_changed_cb,
win);
elm_box_pack_end(bx_opt, ck);
@@ -1745,7 +1783,7 @@ test_gengrid_focus(void *data EINA_UNUSED,
ck = elm_check_add(bx_opt);
elm_object_text_set(ck, "Focus Animation");
- elm_check_state_set(ck, EINA_TRUE);
+ elm_check_state_set(ck, EINA_FALSE);
evas_object_size_hint_weight_set(ck, EVAS_HINT_EXPAND, 0.0);
evas_object_smart_callback_add(ck, "changed",
_gg_focus_focus_animate_changed_cb,