forked from enlightenment/efl
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
This commit is contained in:
parent
06ec847a7c
commit
6f87330fe2
|
@ -20,6 +20,15 @@ state_changed_cb(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *eve
|
|||
printf("State Pointer Value: %d\n", eb);
|
||||
}
|
||||
|
||||
static void
|
||||
state_changed_cb2(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
if (elm_check_state_get(obj) == EINA_FALSE)
|
||||
elm_object_text_set(obj, NULL);
|
||||
else
|
||||
elm_object_text_set(obj, "text is visible when check state is true.");
|
||||
}
|
||||
|
||||
void
|
||||
test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_info EINA_UNUSED)
|
||||
{
|
||||
|
@ -106,6 +115,13 @@ test_check(void *data EINA_UNUSED, Evas_Object *obj EINA_UNUSED, void *event_inf
|
|||
evas_object_show(ck);
|
||||
evas_object_show(ic);
|
||||
|
||||
ck = elm_check_add(win);
|
||||
elm_box_pack_end(bx, ck);
|
||||
elm_object_text_set(ck, "text is visible when check state is true.");
|
||||
elm_check_state_set(ck, EINA_TRUE);
|
||||
evas_object_show(ck);
|
||||
evas_object_smart_callback_add(ck, "changed", state_changed_cb2, NULL);
|
||||
|
||||
evas_object_show(win);
|
||||
}
|
||||
|
||||
|
|
|
@ -1240,6 +1240,7 @@ _efl_ui_layout_text_set(Eo *obj, Efl_Ui_Layout_Data *sd, const char *part, const
|
|||
edje_object_part_text_escaped_set
|
||||
(wd->resize_obj, part, NULL);
|
||||
sd->subs = eina_list_remove_list(sd->subs, l);
|
||||
elm_layout_sizing_eval(obj);
|
||||
return EINA_TRUE;
|
||||
}
|
||||
else
|
||||
|
|
Loading…
Reference in New Issue