summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorMike Blumenkrantz <zmike@samsung.com>2019-07-30 13:11:24 -0400
committerMike Blumenkrantz <zmike@samsung.com>2019-07-30 13:12:52 -0400
commit268d06d3810e0b4343e86d82ed7f42f5ac1ea80a (patch)
tree749fcf06791639b0a95c6731147874bb518db5a6 /src/lib
parentadc510f9eec2c6a5807b936f261ae5cdce0d36b4 (diff)
efl_ui/layout: use min size hints when calculating layout size
Summary: for legacy layouts, all min size hints should be considered when performing size calculations for non-legacy layouts, only "user" min size hints should be considered, as we are calculating the restricted min size hint in this function Depends on D9434 Reviewers: bu5hm4n Reviewed By: bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl_widgets Maniphest Tasks: T8059 Differential Revision: https://phab.enlightenment.org/D9435
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/efl_ui_layout.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/src/lib/elementary/efl_ui_layout.c b/src/lib/elementary/efl_ui_layout.c
index ad26dbe59d..b00648e3a6 100644
--- a/src/lib/elementary/efl_ui_layout.c
+++ b/src/lib/elementary/efl_ui_layout.c
@@ -162,12 +162,25 @@ _part_cursor_free(Efl_Ui_Layout_Sub_Object_Cursor *pc)
162static void 162static void
163_sizing_eval(Evas_Object *obj, Efl_Ui_Layout_Data *sd) 163_sizing_eval(Evas_Object *obj, Efl_Ui_Layout_Data *sd)
164{ 164{
165 Evas_Coord minh = -1, minw = -1; 165 int minh = 0, minw = 0;
166 Evas_Coord rest_w = 0, rest_h = 0; 166 int rest_w = 0, rest_h = 0;
167 Eina_Size2D sz;
167 ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd); 168 ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
168 169
169 if (!efl_alive_get(obj)) return; 170 if (!efl_alive_get(obj)) return;
170 171
172 if (elm_widget_is_legacy(obj))
173 sz = efl_gfx_hint_size_combined_min_get(obj);
174 else
175 sz = efl_gfx_hint_size_min_get(obj);
176 minw = sz.w;
177 minh = sz.h;
178
179 if (minw > rest_w)
180 rest_w = minw;
181 if (minh > rest_h)
182 rest_h = minh;
183
171 if (sd->restricted_calc_w) 184 if (sd->restricted_calc_w)
172 rest_w = wd->w; 185 rest_w = wd->w;
173 if (sd->restricted_calc_h) 186 if (sd->restricted_calc_h)