summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-03-10 15:18:57 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-03-10 15:20:22 +0900
commit6c62ae3e6e1531d76a31aaacebee35f76b0abfa4 (patch)
tree9d7d858e4f789b878684163c095c482b3db04113
parent60566ca34d0036d21e5d134ba299b6f0fa26ce86 (diff)
downloadefl-6c62ae3e6e1531d76a31aaacebee35f76b0abfa4.tar.gz
Revert "Genlist: Calculate the min size of content before item realize"
This reverts commit 60566ca34d0036d21e5d134ba299b6f0fa26ce86. This broke the layout in "Genlist Full Widget"
-rw-r--r--src/lib/elementary/elm_genlist.c17
1 files changed, 8 insertions, 9 deletions
diff --git a/src/lib/elementary/elm_genlist.c b/src/lib/elementary/elm_genlist.c
index aa049c898f..3197500492 100644
--- a/src/lib/elementary/elm_genlist.c
+++ b/src/lib/elementary/elm_genlist.c
@@ -412,17 +412,16 @@ _item_content_realize(Elm_Gen_Item *it,
// 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.
- Evas_Object *resize_obj = NULL;
- if (efl_isa(content, ELM_WIDGET_CLASS))
+ if (efl_class_get(content) == ELM_LAYOUT_CLASS)
{
- ELM_WIDGET_DATA_GET_OR_RETURN(content, wd);
- resize_obj = wd->resize_obj;
- }
- else if (efl_isa(content, EFL_CANVAS_GROUP_CLASS))
- resize_obj = content;
+ Evas_Coord old_w, old_h, minw = 0, minh = 0;
+ efl_gfx_size_hint_combined_min_get(content, &old_w, &old_h);
+ edje_object_size_min_calc(elm_layout_edje_get(content), &minw, &minh);
- if (resize_obj && efl_canvas_group_need_recalculate_get(resize_obj))
- efl_canvas_group_calculate(content);
+ if (old_w > minw) minw = old_w;
+ if (old_h > minh) minw = old_h;
+ evas_object_size_hint_min_set(content, minw, minh);
+ }
if (!edje_object_part_swallow(target, key, content))
{