forked from enlightenment/efl
elc_popup: If popup's parent is resized, popup need to resized, too
Summary: When window's size is not enough to show popup, popup resize smaller to show it in appropriate size. But if window resize larger enough to show popup, popup is locked in small size. On the contrary to this case, if window resize too smaller, popup has still large size, so popup doesn't display properly. Test Plan: 1. elementary_test popup 2. maximize test list window 3. click 8th item, "popup-center-title + items + 3 buttons" 4. restore window size 5. close popup, resize window to smaller than popup in 3). 6. click 8th item, "popup-center-title + items + 3 buttons" 7. restore window size popup size of 4. and 7. is different Reviewers: jaehwan, cedric, raster, id213sin, singh.amitesh, SanghyeonLee Subscribers: jpeg Differential Revision: https://phab.enlightenment.org/D3854
This commit is contained in:
parent
1efa5dfe57
commit
33d9bcc551
|
@ -187,6 +187,20 @@ _size_hints_changed_cb(void *data,
|
|||
elm_layout_sizing_eval(data);
|
||||
}
|
||||
|
||||
static void
|
||||
_notify_resize_cb(void *data,
|
||||
Evas *e EINA_UNUSED,
|
||||
Evas_Object *obj EINA_UNUSED,
|
||||
void *event_info EINA_UNUSED)
|
||||
{
|
||||
Evas_Object *popup = data;
|
||||
|
||||
ELM_POPUP_CHECK(popup);
|
||||
|
||||
_scroller_size_calc(popup);
|
||||
elm_layout_sizing_eval(popup);
|
||||
}
|
||||
|
||||
static void
|
||||
_list_del(Elm_Popup_Data *sd)
|
||||
{
|
||||
|
@ -221,6 +235,7 @@ _elm_popup_evas_object_smart_del(Eo *obj, Elm_Popup_Data *sd)
|
|||
|
||||
evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_RESIZE, _parent_geom_cb, obj);
|
||||
evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_MOVE, _parent_geom_cb, obj);
|
||||
evas_object_event_callback_del_full(sd->notify, EVAS_CALLBACK_RESIZE, _notify_resize_cb, obj);
|
||||
|
||||
eo_event_callback_array_del(sd->notify, _notify_cb(), obj);
|
||||
evas_object_event_callback_del
|
||||
|
@ -1501,6 +1516,8 @@ _elm_popup_evas_object_smart_add(Eo *obj, Elm_Popup_Data *priv)
|
|||
(priv->notify, EVAS_HINT_FILL, EVAS_HINT_FILL);
|
||||
evas_object_smart_member_add(priv->notify, obj);
|
||||
|
||||
evas_object_event_callback_add(priv->notify, EVAS_CALLBACK_RESIZE, _notify_resize_cb, obj);
|
||||
|
||||
priv->main_layout = elm_layout_add(obj);
|
||||
if (!elm_layout_theme_set(priv->main_layout, "popup", "base",
|
||||
elm_widget_style_get(obj)))
|
||||
|
|
Loading…
Reference in New Issue