Re: padding cleanup



On Thu, 2010-09-02 at 19:58 -0400, Havoc Pennington wrote:

> > And here are some of the 'layout' style properties:
> 
> I think we could add style props on GtkWidget that would modify the
> padding on the widget (I don't know if they'd just replace the
> programmer-set padding, or be an adjustment to it?). That would be
> simple once GtkWidget has padding, I think.
> 
> I don't know if the widget style props would replace most of these
> though - it looks like most of these paddings and spacings are
> somewhere inside a widget, not on the border.

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.

Regards,

Thomas

¹http://www.w3.org/TR/CSS2/box.html#box-dimensions



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