summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcel Hollerbach <mail@marcel-hollerbach.de>2019-08-28 21:11:11 +0200
committerMarcel Hollerbach <mail@marcel-hollerbach.de>2019-09-05 11:17:04 +0200
commit605d04a302e709692aaa6c9b3d1aa2d76cd2d36e (patch)
tree0c318325a41b4688b44a0ff16cad35372bbe1419
parent7915aafedda6cb663f185eaa97c187c03eb1a907 (diff)
efl_ui_collection: use the correct min size hint
there are not enough size hints, we should add more! I mixed up which size hints i should have used here, after some back and forth it turns out that i should use the combined. This fixes the list example. Reviewed-by: Mike Blumenkrantz <michael.blumenkrantz@gmail.com> Differential Revision: https://phab.enlightenment.org/D9779
-rw-r--r--src/examples/elementary/efl_ui_list_example_1.c1
-rw-r--r--src/lib/elementary/efl_ui_collection.c4
2 files changed, 3 insertions, 2 deletions
diff --git a/src/examples/elementary/efl_ui_list_example_1.c b/src/examples/elementary/efl_ui_list_example_1.c
index 81d378b9c9..5cadb29e6b 100644
--- a/src/examples/elementary/efl_ui_list_example_1.c
+++ b/src/examples/elementary/efl_ui_list_example_1.c
@@ -315,6 +315,7 @@ elm_main(int argc EINA_UNUSED, char **argv)
315 elm_win_resize_object_add(win, wbox); 315 elm_win_resize_object_add(win, wbox);
316 //window show 316 //window show
317 efl_gfx_entity_visible_set(win, EINA_TRUE); 317 efl_gfx_entity_visible_set(win, EINA_TRUE);
318 efl_gfx_entity_size_set(win, EINA_SIZE2D(417, 600));
318 319
319 elm_run(); 320 elm_run();
320 321
diff --git a/src/lib/elementary/efl_ui_collection.c b/src/lib/elementary/efl_ui_collection.c
index a3ad0daf57..2922c4b7cb 100644
--- a/src/lib/elementary/efl_ui_collection.c
+++ b/src/lib/elementary/efl_ui_collection.c
@@ -300,14 +300,14 @@ _size_accessor_get_at(void *data, Efl_Ui_Position_Manager_Size_Call_Config conf,
300 for (i = 0; i < (conf.range.end_id - conf.range.start_id); ++i) 300 for (i = 0; i < (conf.range.end_id - conf.range.start_id); ++i)
301 { 301 {
302 Efl_Gfx_Entity *geom = eina_list_data_get(lst), *parent; 302 Efl_Gfx_Entity *geom = eina_list_data_get(lst), *parent;
303 Eina_Size2D size = efl_gfx_hint_size_min_get(geom); 303 Eina_Size2D size = efl_gfx_hint_size_combined_min_get(geom);
304 304
305 parent = efl_ui_item_parent_get(geom); 305 parent = efl_ui_item_parent_get(geom);
306 sizes[i].size = size; 306 sizes[i].size = size;
307 _fill_depth(geom, &sizes[i].element_depth, &sizes[i].depth_leader); 307 _fill_depth(geom, &sizes[i].element_depth, &sizes[i].depth_leader);
308 if (i == 0 && !sizes[0].depth_leader && parent) 308 if (i == 0 && !sizes[0].depth_leader && parent)
309 { 309 {
310 result.parent_size = efl_gfx_hint_size_min_get(parent); 310 result.parent_size = efl_gfx_hint_size_combined_min_get(parent);
311 } 311 }
312 lst = eina_list_next(lst); 312 lst = eina_list_next(lst);
313 if (!lst) 313 if (!lst)