From 96fbea9daecf7040ac63203c4823722fa6d5d73f Mon Sep 17 00:00:00 2001 From: "Carsten Haitzler (Rasterman)" Date: Mon, 25 Jul 2016 16:56:15 +0900 Subject: [PATCH] elm table and box resize themselves on sizing eval - fix this - dont resize thsi fixes T3031 @fix --- src/lib/elementary/elm_box.c | 19 +++---------------- src/lib/elementary/elm_table.c | 13 ++----------- 2 files changed, 5 insertions(+), 27 deletions(-) diff --git a/src/lib/elementary/elm_box.c b/src/lib/elementary/elm_box.c index adb080f1fb..9532f8f175 100644 --- a/src/lib/elementary/elm_box.c +++ b/src/lib/elementary/elm_box.c @@ -123,29 +123,16 @@ static void _sizing_eval(Evas_Object *obj) { Evas_Coord minw = -1, minh = -1, maxw = -1, maxh = -1; - Evas_Coord w, h; ELM_BOX_DATA_GET(obj, sd); ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); - if (sd->delete_me) - return; - - efl_gfx_size_hint_combined_min_get - (wd->resize_obj, &minw, &minh); - - evas_object_size_hint_max_get - (wd->resize_obj, &maxw, &maxh); + if (sd->delete_me) return; + efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh); + evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh); evas_object_size_hint_min_set(obj, minw, minh); evas_object_size_hint_max_set(obj, maxw, maxh); - - evas_object_geometry_get(obj, NULL, NULL, &w, &h); - if (w < minw) w = minw; - if (h < minh) h = minh; - if ((maxw >= 0) && (w > maxw)) w = maxw; - if ((maxh >= 0) && (h > maxh)) h = maxh; - evas_object_resize(obj, w, h); } static void diff --git a/src/lib/elementary/elm_table.c b/src/lib/elementary/elm_table.c index c6432eaf42..e318b19d07 100644 --- a/src/lib/elementary/elm_table.c +++ b/src/lib/elementary/elm_table.c @@ -122,22 +122,13 @@ static void _sizing_eval(Evas_Object *obj) { Evas_Coord minw = 0, minh = 0, maxw = -1, maxh = -1; - Evas_Coord w, h; ELM_WIDGET_DATA_GET_OR_RETURN(obj, wd); - efl_gfx_size_hint_combined_min_get - (wd->resize_obj, &minw, &minh); - evas_object_size_hint_max_get - (wd->resize_obj, &maxw, &maxh); + efl_gfx_size_hint_combined_min_get(wd->resize_obj, &minw, &minh); + evas_object_size_hint_max_get(wd->resize_obj, &maxw, &maxh); evas_object_size_hint_min_set(obj, minw, minh); evas_object_size_hint_max_set(obj, maxw, maxh); - evas_object_geometry_get(obj, NULL, NULL, &w, &h); - if (w < minw) w = minw; - if (h < minh) h = minh; - if ((maxw >= 0) && (w > maxw)) w = maxw; - if ((maxh >= 0) && (h > maxh)) h = maxh; - evas_object_resize(obj, w, h); } static void