summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinYong Park <j4939.park@samsung.com>2017-08-23 13:29:14 +0900
committerJaehyun Cho <jae_hyun.cho@samsung.com>2017-08-23 13:29:14 +0900
commit6f87330fe2f785a3d9d2711b808afdfb187f629b (patch)
treee02b17349d6a4a1d4e3feaf70828764ceea76669
parent06ec847a7c13a8f7f43a5216264ea7a4e25c4bee (diff)
layout: call size calculating after text_set(NULL)
Summary: When text set NULL, size is not changed even text is removed. So, fix that case logic 1. send text,hidden signal 2. remove text 3. call sizing eval to resize layout Test Plan: 1. run elementary_test -to check 2. change value last check object 3. compare before and after Reviewers: Jaehyun_Cho, cedric, jpeg Differential Revision: https://phab.enlightenment.org/D5086
-rw-r--r--src/bin/elementary/test_check.c16
-rw-r--r--src/lib/elementary/efl_ui_layout.c1
2 files changed, 17 insertions, 0 deletions
diff --git a/src/bin/elementary/test_check.c b/src/bin/elementary/test_check.c
index 1ee3935cc0..6841230db9 100644
--- a/src/bin/elementary/test_check.c
+++ b/src/bin/elementary/test_check.c
@@ -20,6 +20,15 @@ state_changed_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
20 printf("State Pointer Value: %d\n", eb); 20 printf("State Pointer Value: %d\n", eb);
21} 21}
22 22
23static void
24state_changed_cb2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
25{
26 if (elm_check_state_get(obj) == EINA_FALSE)
27 elm_object_text_set(obj, NULL);
28 else
29 elm_object_text_set(obj, "text is visible when check state is true.");
30}
31
23void 32void
24test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED) 33test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
25{ 34{
@@ -106,6 +115,13 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
106 evas_object_show(ck); 115 evas_object_show(ck);
107 evas_object_show(ic); 116 evas_object_show(ic);
108 117
118 ck = elm_check_add(win);
119 elm_box_pack_end(bx, ck);
120 elm_object_text_set(ck, "text is visible when check state is true.");
121 elm_check_state_set(ck, EINA_TRUE);
122 evas_object_show(ck);
123 evas_object_smart_callback_add(ck, "changed", state_changed_cb2, NULL);
124
109 evas_object_show(win); 125 evas_object_show(win);
110} 126}
111 127
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index b3fac74aeb..d64f873112 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -1240,6 +1240,7 @@ _efl_ui_layout_text_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, const
1240 edje_object_part_text_escaped_set 1240 edje_object_part_text_escaped_set
1241 (wd->resize_obj, part, NULL); 1241 (wd->resize_obj, part, NULL);
1242 sd->subs = eina_list_remove_list(sd->subs, l); 1242 sd->subs = eina_list_remove_list(sd->subs, l);
1243 elm_layout_sizing_eval(obj);
1243 return EINA_TRUE; 1244 return EINA_TRUE;
1244 } 1245 }
1245 else 1246 else