Re: align vs expand vs grid
- From: Havoc Pennington <hp pobox com>
- To: Matthias Clasen <matthias clasen gmail com>
- Cc: gtk-devel-list <gtk-devel-list gnome org>, Benjamin Otte <otte gnome org>
- Subject: Re: align vs expand vs grid
- Date: Sun, 15 May 2011 22:42:25 -0400
Hi,
On Fri, May 13, 2011 at 12:00 PM, Matthias Clasen
<matthias clasen gmail com> wrote:
>> Second, if children should never get
>> assigned extra space, why do we have the ALIGN_FILL parameter?
>
> expand is about whether you _want_ the child to receive extra space.
> align=fill is about how the child should react if it _gets_ extra
> space, wanted or not...
>
I agree with this, that's exactly how I would have answered.
A widget can get extra space without having expand=true, say for
example it's in a container that forces all children to be the same
size.
expand means "extra space is useful" while align describes how to
handle the extra space.
If you think of an image widget, maybe centering the image and scaling
the image up to fill the space would both be useful behaviors,
depending on the app. So you could use align=CENTER or align=FILL.
Something like that.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]