popup: fix resize issue when action area and title area is absent.

Summary:
set scroller size in content_set.

Resolves: T2623
@fix

Test Plan:
1. run ecrire
2. Add some text in newfile
3. Close ecrire
4. a almost zero size popup.

Reviewers: tasn, herdsman, raster, SanghyeonLee, stefan_schmidt

Reviewed By: stefan_schmidt

Subscribers: stefan_schmidt, herb, seoz

Maniphest Tasks: T2623

Differential Revision: https://phab.enlightenment.org/D2901
This commit is contained in:
Amitesh Singh 2015-08-03 10:28:55 +01:00 committed by Tom Hacohen
parent 69441625b1
commit 667ec47586
1 changed files with 8 additions and 10 deletions

View File

@ -1001,8 +1001,6 @@ _title_icon_set(Evas_Object *obj,
elm_layout_signal_emit(sd->main_layout, "elm,state,title,icon,visible", "elm");
if (title_visibility_old != title_visibility_current) _visuals_set(obj);
elm_layout_sizing_eval(obj);
return EINA_TRUE;
}
@ -1030,7 +1028,6 @@ _content_set(Evas_Object *obj,
evas_object_event_callback_add
(content, EVAS_CALLBACK_DEL, _on_content_del, obj);
}
elm_layout_sizing_eval(obj);
return EINA_TRUE;
}
@ -1095,9 +1092,6 @@ _action_button_set(Evas_Object *obj,
snprintf(buf, sizeof(buf), "elm.swallow.content.button%i", idx + 1);
elm_object_part_content_set
(sd->action_area, buf, sd->buttons[idx]->btn);
_scroller_size_calc(obj);
elm_layout_sizing_eval(obj);
}
EOLIAN static Eina_Bool
@ -1105,11 +1099,12 @@ _elm_popup_elm_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, c
{
Eina_Bool tmp;
unsigned int i;
Eina_Bool ret = EINA_TRUE;
if (!part || !strcmp(part, "default"))
return _content_set(obj, content);
ret = _content_set(obj, content);
else if (!strcmp(part, "title,icon"))
return _title_icon_set(obj, content);
ret = _title_icon_set(obj, content);
else if (!strncmp(part, "button", 6))
{
i = atoi(part + 6) - 1;
@ -1123,9 +1118,12 @@ _elm_popup_elm_container_content_set(Eo *obj, Elm_Popup_Data *_pd EINA_UNUSED, c
_action_button_set(obj, content, i);
}
else
return eo_do_ret(_pd->main_layout, tmp, elm_obj_container_content_set(part, content));
ret = eo_do_ret(_pd->main_layout, tmp, elm_obj_container_content_set(part, content));
return EINA_TRUE;
_scroller_size_calc(obj);
elm_layout_sizing_eval(obj);
return ret;
}
static Evas_Object *