sanghyeonlee pushed a commit to branch master. http://git.enlightenment.org/core/elementary.git/commit/?id=4a35e8df513c2799465694d63c02abb33f43d713
commit 4a35e8df513c2799465694d63c02abb33f43d713 Author: SangHyeon Lee <[email protected]> Date: Mon Jan 4 18:02:11 2016 +0900 genlist : add size_calc forcely about content when elm_layout. Summary: If the content object of genlist item is 'elm_layout' class, minimum size cannot get directly becuase layout do the delay calculating. So to make proper genlist size calc, before the swallowing, forcely do the size calc about layout class contents in genlist. @fix Test Plan: N/A Reviewers: raster, cedric, singh.amitesh, Hermet Reviewed By: Hermet Subscribers: seoz, conr2d, eagleeye Differential Revision: https://phab.enlightenment.org/D3478 --- src/lib/elm_genlist.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c index a4285d0..d4d24c9 100644 --- a/src/lib/elm_genlist.c +++ b/src/lib/elm_genlist.c @@ -385,6 +385,21 @@ _item_content_realize(Elm_Gen_Item *it, content = it->itc->func.content_get ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key); if (!content) continue; + + // FIXME: cause elm_layout sizing eval is delayed by smart calc, + // genlist cannot get actual min size of edje. + // This is workaround code to set min size directly. + if (eo_class_get(content) == ELM_LAYOUT_CLASS) + { + Evas_Coord old_w, old_h, minw = 0, minh = 0; + evas_object_size_hint_min_get(content, &old_w, &old_h); + edje_object_size_min_calc(elm_layout_edje_get(content), &minw, &minh); + + if (old_w > minw) minw = old_w; + if (old_h > minh) minw = old_h; + evas_object_size_hint_min_set(content, minw, minh); + } + *contents = eina_list_append(*contents, content); if (!edje_object_part_swallow(target, key, content)) { --
