summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSangHyeon Lee <sh10233.lee@samsung.com>2016-01-04 18:02:11 +0900
committerSangHyeon Lee <sh10233.lee@samsung.com>2016-01-04 18:02:11 +0900
commit4a35e8df513c2799465694d63c02abb33f43d713 (patch)
tree3866b67279ba2373f54da31017fc251d4c43c2f4
parentd1867909117123f74ac6a3561296a7bd57e5c22f (diff)
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
-rw-r--r--src/lib/elm_genlist.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/lib/elm_genlist.c b/src/lib/elm_genlist.c
index a4285d011..d4d24c9ea 100644
--- a/src/lib/elm_genlist.c
+++ b/src/lib/elm_genlist.c
@@ -385,6 +385,21 @@ _item_content_realize(Elm_Gen_Item *it,
385 content = it->itc->func.content_get 385 content = it->itc->func.content_get
386 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key); 386 ((void *)WIDGET_ITEM_DATA_GET(EO_OBJ(it)), WIDGET(it), key);
387 if (!content) continue; 387 if (!content) continue;
388
389 // FIXME: cause elm_layout sizing eval is delayed by smart calc,
390 // genlist cannot get actual min size of edje.
391 // This is workaround code to set min size directly.
392 if (eo_class_get(content) == ELM_LAYOUT_CLASS)
393 {
394 Evas_Coord old_w, old_h, minw = 0, minh = 0;
395 evas_object_size_hint_min_get(content, &old_w, &old_h);
396 edje_object_size_min_calc(elm_layout_edje_get(content), &minw, &minh);
397
398 if (old_w > minw) minw = old_w;
399 if (old_h > minh) minw = old_h;
400 evas_object_size_hint_min_set(content, minw, minh);
401 }
402
388 *contents = eina_list_append(*contents, content); 403 *contents = eina_list_append(*contents, content);
389 if (!edje_object_part_swallow(target, key, content)) 404 if (!edje_object_part_swallow(target, key, content))
390 { 405 {