summaryrefslogtreecommitdiff
path: root/legacy
diff options
context:
space:
mode:
authorAmitesh Singh <amitesh.sh@samsung.com>2015-05-18 20:29:37 +0900
committerCarsten Haitzler (Rasterman) <raster@rasterman.com>2015-05-18 20:29:37 +0900
commitb416722303b84632e7029ccefc859135f488cee4 (patch)
treecf38ff48d2f5431fb731fe8030f998a0d9d08731 /legacy
parentea8838eb46c2f470515b389394d0b59545e8625b (diff)
genlist: track viewport size changes and re-eval items when it resizes
Summary: This uses new Evas Callback type EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE to listen to view port size changes. Reviewers: Hermet, cedric, raster Reviewed By: raster Subscribers: SanghyeonLee, seoz Differential Revision: https://phab.enlightenment.org/D2527
Diffstat (limited to 'legacy')
-rw-r--r--legacy/elementary/src/lib/elm_genlist.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/legacy/elementary/src/lib/elm_genlist.c b/legacy/elementary/src/lib/elm_genlist.c
index 18dcee46eb..6d824cca3f 100644
--- a/legacy/elementary/src/lib/elm_genlist.c
+++ b/legacy/elementary/src/lib/elm_genlist.c
@@ -5401,6 +5401,13 @@ _elm_genlist_focus_highlight_move_up_end_cb(void *data,
5401 _elm_widget_focus_highlight_signal_emit(gl, "elm,action,focus,move,home,down", "elm"); 5401 _elm_widget_focus_highlight_signal_emit(gl, "elm,action,focus,move,home,down", "elm");
5402} 5402}
5403 5403
5404static void
5405_evas_viewport_resize_cb(void *d, Evas *e EINA_UNUSED, void *ei EINA_UNUSED)
5406{
5407 Elm_Genlist_Data *priv = d;
5408 evas_object_smart_changed(priv->pan_obj);
5409}
5410
5404EOLIAN static void 5411EOLIAN static void
5405_elm_genlist_evas_object_smart_add(Eo *obj, Elm_Genlist_Data *priv) 5412_elm_genlist_evas_object_smart_add(Eo *obj, Elm_Genlist_Data *priv)
5406{ 5413{
@@ -5481,6 +5488,9 @@ _elm_genlist_evas_object_smart_add(Eo *obj, Elm_Genlist_Data *priv)
5481 5488
5482 edje_object_signal_callback_add(wd->resize_obj, "elm,looping,up,done", "elm", _elm_genlist_looping_up_cb, obj); 5489 edje_object_signal_callback_add(wd->resize_obj, "elm,looping,up,done", "elm", _elm_genlist_looping_up_cb, obj);
5483 edje_object_signal_callback_add(wd->resize_obj, "elm,looping,down,done", "elm", _elm_genlist_looping_down_cb, obj); 5490 edje_object_signal_callback_add(wd->resize_obj, "elm,looping,down,done", "elm", _elm_genlist_looping_down_cb, obj);
5491 evas_event_callback_add(evas_object_evas_get(obj),
5492 EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE,
5493 _evas_viewport_resize_cb, priv);
5484} 5494}
5485 5495
5486EOLIAN static void 5496EOLIAN static void
@@ -5491,6 +5501,10 @@ _elm_genlist_evas_object_smart_del(Eo *obj, Elm_Genlist_Data *sd)
5491 elm_genlist_clear(obj); 5501 elm_genlist_clear(obj);
5492 for (i = 0; i < 2; i++) 5502 for (i = 0; i < 2; i++)
5493 ELM_SAFE_FREE(sd->stack[i], evas_object_del); 5503 ELM_SAFE_FREE(sd->stack[i], evas_object_del);
5504
5505 evas_event_callback_del_full(evas_object_evas_get(obj),
5506 EVAS_CALLBACK_CANVAS_VIEWPORT_RESIZE,
5507 _evas_viewport_resize_cb, sd);
5494 ELM_SAFE_FREE(sd->pan_obj, evas_object_del); 5508 ELM_SAFE_FREE(sd->pan_obj, evas_object_del);
5495 5509
5496 _item_cache_zero(sd); 5510 _item_cache_zero(sd);