efl_ui_table: refactor layout_update

Authored by YOhoho on Feb 27 2019, 11:45 AM.


efl_ui_table: refactor layout_update

There are three reasons to refactor layout_update of Efl.Ui.Table.

1. Inconsistency of hint behavior.

Some hint property is often not respected. for example, hint_min is ignored in
Table when it is used with hint_max even if hint_weight is 0. hint_aspect is
always ignored in Table.
The ambiguous behavior make it hard to layout widgets in container. of course,
we documented 'it's just a hint that should be used whenever appropriate.' but i
don't think it means that 'hint API is sometimes respected and we also don't
know when that API is respected.'. at least there is rule for consistent
behavior and we should be able to explain why a widget is located here and
why some hint property is ignored.

So, i'll suggest priority of hint property. this refactoring support following

  1. HintMin
  2. HintMin + HintAspect
  3. HintMargin
  4. HintMax
  5. HintAspect
  6. HintWeight, HintFill
  7. HintAlign

ref T5487
Please check with unit test D7840

2. To Enhance usability.

Efl.Ui.Table is using homogeneous mode of evas_table which have same columns,
rows size. but i think a table can generally change columns, rows size and
we can provide homogeneous mode option.(D7892)

In this patch

  • table columns(rows) min size is decided by maximum size among its cells

width(height) min size.

  • table columns(rows) weight is decided by maximum weight among its cells

horizontal(vertical) weight.

Also, pack_align is implemented. it is used if no item has a weight.

3. To remove internal evas_table.

This is low priority work. however, i guess is is necessary for lightweight
container widget. there are two size_hint callback to adjust table size and
efl_canvas_group_calculate is called twice when it is resized.
This patch is first step to remove internal evas_table.

Test Plan:
make check
elementary_test -to 'efl.ui.table'

Reviewers: jpeg, Jaehyun_Cho, zmike

Reviewed By: zmike

Subscribers: zmike, cedric, reviewers, committers

Tags: efl

Maniphest Tasks: T5487

Differential Revision: https://phab.enlightenment.org/D7841