On Mon, 28 Dec 2015 04:57:04 +0000 Conrad Um <[email protected]> said:
> 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. sure. these are different. both belong to the object itself. one is implemented by parent (padding) one by child (margin). ok. > 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.) actually edje objects can do it.. add padding to min size when calculating and always move object in from swallow geom by pad left + pad top and resize it to swallow size mind all the padding on each axis. margins can just be added ALSO to min size too as above but the object isnt offset by margin or reduced by the margin in side. > 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. ok scaling is an issue. should padding or margin be multiplied by scale? hmmm. i lean to "no". multiply by scale yourself when setting it... UNLESS we add a boolean flag to hints to say "multiply by scale factor" ... we do have an evas scale factor per object too... :) > 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. i think they can be applied at the same time - for different purposes. one adds "empty padding" around the object. the parent does this. the other EXPANDS the minimum size of an object by the margin. the object should be resized by the parent of course. should these be scaled? good q. > Best regards, > Jee-Yong Um (conr2d) > ------------------------------------------------------------------------------ > _______________________________________________ > enlightenment-devel mailing list > [email protected] > https://lists.sourceforge.net/lists/listinfo/enlightenment-devel > -- ------------- Codito, ergo sum - "I code, therefore I am" -------------- The Rasterman (Carsten Haitzler) [email protected] ------------------------------------------------------------------------------ _______________________________________________ enlightenment-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/enlightenment-devel
