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
This commit is contained in:
Mike Blumenkrantz 2019-07-30 13:11:24 -04:00
parent adc510f9ee
commit 268d06d381
1 changed files with 15 additions and 2 deletions

View File

@ -162,12 +162,25 @@ _part_cursor_free(Efl_Ui_Layout_Sub_Object_Cursor *pc)
static void
_sizing_eval(Evas_Object *obj, Efl_Ui_Layout_Data *sd)
{
Evas_Coord minh = -1, minw = -1;
Evas_Coord rest_w = 0, rest_h = 0;
int minh = 0, minw = 0;
int rest_w = 0, rest_h = 0;
Eina_Size2D sz;
ELM_WIDGET_DATA_GET_OR_RETURN(sd->obj, wd);
if (!efl_alive_get(obj)) return;
if (elm_widget_is_legacy(obj))
sz = efl_gfx_hint_size_combined_min_get(obj);
else
sz = efl_gfx_hint_size_min_get(obj);
minw = sz.w;
minh = sz.h;
if (minw > rest_w)
rest_w = minw;
if (minh > rest_h)
rest_h = minh;
if (sd->restricted_calc_w)
rest_w = wd->w;
if (sd->restricted_calc_h)