Re: padding cleanup
- From: Thomas Wood <thos gnome org>
- To: Havoc Pennington <hp pobox com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>
- Subject: Re: padding cleanup
- Date: Tue, 07 Sep 2010 14:30:45 +0100
On Sat, 2010-09-04 at 15:59 -0400, Havoc Pennington wrote:
> 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
> 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
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.
] [Thread Prev