hermet pushed a commit to branch master.

http://git.enlightenment.org/core/efl.git/commit/?id=33d9bcc55123343489037aa868ed5a3cd05e9438

commit 33d9bcc55123343489037aa868ed5a3cd05e9438
Author: Jinyong Park <j4939.p...@samsung.com>
Date:   Tue Apr 12 00:28:55 2016 +0900

    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
---
 src/lib/elementary/elc_popup.c | 17 +++++++++++++++++
 1 file changed, 17 insertions(+)

diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 4c4549e..c43d22e 100644
--- a/src/lib/elementary/elc_popup.c
+++ b/src/lib/elementary/elc_popup.c
@@ -188,6 +188,20 @@ _size_hints_changed_cb(void *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)
 {
    if (!sd->scr) return;
@@ -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)))

-- 


Reply via email to