Dear all,

I'm seeking for an easier way to make a layout without edc, but only with
code.
I suggested a contianer having flexible padding for layouts like this.
http://imgur.com/E1HfxJF

Now I want to ask opinion about size hint padding or margin.

The biggest difference between size hint padding and margin is whether the
extent of paddings belongs to the area of the object or not. Let's see the
next picture.
http://imgur.com/7pFP0sG

Because of this difference, their behaviors become different between the
object having size hint padding and margin.

size hint padding https://phab.enlightenment.org/D3500
1. calculation: A litte complex. Calculation logic belongs to the container
object like box or table. If the object having size hint padding is not
packed into a container or the container doesn't have the logic handling
child's size hint padding, size hint padding will not work at all. (It's
easy to implement size hint padding on box or table, but seems not so easy
for edje object. If swallowd object has margins, edje should consider those
values while moving or resizing its children.)
2. geometry: Intuitive. Because object and resize object are same,
developer can get geometry of visible area directly.
3. scaling: Inconsistent. Elm.Box has its own calculation logic in
els_box.c but elm_table depends on Evas.Table. Original Evas.Box or
Evas.Table are not affected by scale, because scale factor belongs to
Elementary. So applying scale to size hint padding is easy to Elm.Box, but
hard on Elm.Table.

margin: https://phab.enlightenment.org/D3458
1. calculation: Easy. Calculation logic belongs to the object itself having
margin, so margin can be applied to any container. (child object calculates
its own min size including margins)
2. geometry: Not intuitive. Margins exist between object and its resize
object, so the coordinates can be different between real object and visible
area.
3. scaling: Very simple. Object's min size is determined by adding the min
size of resize object and the scaled margins.

I prefer margin to size hint padding, because of easier implementation and
consistency.
Or, both of size hint padding and margin can be applied at the same time.
If many of you think that size hint padding should be used for flexible
spacing, please advise me about Scaling size hint padding in Elm.Table and
Elm.Layout (Edje.Object).

I appreciate your taking the time to read this long email.

Best regards,
Jee-Yong Um (conr2d)
------------------------------------------------------------------------------
_______________________________________________
enlightenment-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-devel

Reply via email to