summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJinyong Park <j4939.park@samsung.com>2016-04-12 00:28:55 +0900
committerHermet Park <hermet@hermet.pe.kr>2016-04-12 00:28:55 +0900
commit33d9bcc55123343489037aa868ed5a3cd05e9438 (patch)
tree5efc12fa676a24167e48ba4ba520bbc0e40ac6ac
parent1efa5dfe57b8e8d8bb2530861728922059aff7b1 (diff)
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
-rw-r--r--src/lib/elementary/elc_popup.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/src/lib/elementary/elc_popup.c b/src/lib/elementary/elc_popup.c
index 4c4549eb20..c43d22e295 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,
188} 188}
189 189
190static void 190static void
191_notify_resize_cb(void *data,
192 Evas *e EINA_UNUSED,
193 Evas_Object *obj EINA_UNUSED,
194 void *event_info EINA_UNUSED)
195{
196 Evas_Object *popup = data;
197
198 ELM_POPUP_CHECK(popup);
199
200 _scroller_size_calc(popup);
201 elm_layout_sizing_eval(popup);
202}
203
204static void
191_list_del(Elm_Popup_Data *sd) 205_list_del(Elm_Popup_Data *sd)
192{ 206{
193 if (!sd->scr) return; 207 if (!sd->scr) return;
@@ -221,6 +235,7 @@ _elm_popup_evas_object_smart_del(Eo *obj, Elm_Popup_Data *sd)
221 235
222 evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_RESIZE, _parent_geom_cb, obj); 236 evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_RESIZE, _parent_geom_cb, obj);
223 evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_MOVE, _parent_geom_cb, obj); 237 evas_object_event_callback_del_full(sd->parent, EVAS_CALLBACK_MOVE, _parent_geom_cb, obj);
238 evas_object_event_callback_del_full(sd->notify, EVAS_CALLBACK_RESIZE, _notify_resize_cb, obj);
224 239
225 eo_event_callback_array_del(sd->notify, _notify_cb(), obj); 240 eo_event_callback_array_del(sd->notify, _notify_cb(), obj);
226 evas_object_event_callback_del 241 evas_object_event_callback_del
@@ -1501,6 +1516,8 @@ _elm_popup_evas_object_smart_add(Eo *obj, Elm_Popup_Data *priv)
1501 (priv->notify, EVAS_HINT_FILL, EVAS_HINT_FILL); 1516 (priv->notify, EVAS_HINT_FILL, EVAS_HINT_FILL);
1502 evas_object_smart_member_add(priv->notify, obj); 1517 evas_object_smart_member_add(priv->notify, obj);
1503 1518
1519 evas_object_event_callback_add(priv->notify, EVAS_CALLBACK_RESIZE, _notify_resize_cb, obj);
1520
1504 priv->main_layout = elm_layout_add(obj); 1521 priv->main_layout = elm_layout_add(obj);
1505 if (!elm_layout_theme_set(priv->main_layout, "popup", "base", 1522 if (!elm_layout_theme_set(priv->main_layout, "popup", "base",
1506 elm_widget_style_get(obj))) 1523 elm_widget_style_get(obj)))