Re: padding cleanup



On Sat, 2010-09-04 at 15:59 -0400, Havoc Pennington wrote:
> Hi,
> 
> On Sat, Sep 4, 2010 at 1:40 PM, Thomas Wood <thos gnome org> wrote:
> > It might be worth re-using the CSS box model¹ nomenclature here to avoid
> > confusion. In the CSS box model:
> >
> >      *  "margin": extra spacing around the element, outside of the
> >        border.
> >      *  "border": the width of the frame drawn around an element.
> >      *  "padding": the spacing between the content area and the border.
> >
> > The border property may not be strictly necessary, although might be
> > useful for themes. Any other spacing between elements inside a widgets
> > could be referred to with "spacing" properties.
> >
> 
> It's fairly unclear and ambiguous how to apply this to GTK. There
> isn't a frame drawn around elements. Prior to adding a patch like the
> one I'm proposing, there also is no distance between content area and
> border. Most of what's called "padding" in gtk now is probably
> "margin" - except that it "goes with" the container and not the
> widget.
> 
> If we add just one kind of extra space around a widget, and it would
> not be included in the allocation the widget gets (which is true in
> the implementation I proposed most recently), then I guess the widget
> won't draw its background in this space. And there won't be any color
> or anything there. So maybe what I'm suggesting we add is best called
> margin.

I would agree. Your new properties refer to extra spacing added around
the widget, so the "margin" name would make the most sense in terms of
the W3C box model.

Regards,

Thomas



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]