grub-devel
[Top][All Lists]
Advanced

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

Re: [GITGRUB] New menu interface (implementation)


From: Michal Suchanek
Subject: Re: [GITGRUB] New menu interface (implementation)
Date: Thu, 8 Oct 2009 23:46:38 +0200

2009/10/8 Bean <address@hidden>:
> On Thu, Oct 8, 2009 at 7:18 PM, Michal Suchanek <address@hidden> wrote:
>>> 2, You should use far position as you want to extend the widget at the
>>> far side (top).
>>
>> This dependency is a problem. The rules for creating a working layout
>> are then complicated and hard to understand.
>>
>> Also I have no idea why I should set position on the screen, it is
>> never positioned.
>
> Hi,
>
> For example, if parent width=10, two children, width=4, then the
> extend property decide how to assign the extra 2 space:
>
> extend=first, space is added to first widget, which is 6,4
> extend=all, space is distributed to alls widget, which is 5,5
> extend=last, space is added to last widget, which is 4,6

This should not be necessary. The default is to wrap the children with
any spacing the children specify.  This should work nicely for layouts
similar to the current gfxterm.

If the panel is larger (because it is itself extended or fixed-width)
then children are packed at the start (which is determined by
direction). This should work nicely for buttons in a dialog box, for
example. If a dialog has two buttons they should be placed together,
placing one on each end can easily lead to situation when the user
notices only one of the buttons.

If you want to explicitly control which children get the available
space then finer granularity is again achieved by setting properties
on the chidren. Any child that has the expand property will take a
share of the surplus space. If you want children to take space without
growing add another property which specifies that the space should be
taken without expanding the element.

For example, gtk2 has properties expand and fill. Expand means that
the element will take surplus space and fill means that the element
enlarges to fill the surplus space.

With these properties you can specify that third element out of four
can get extra space which is not available with extend property on the
parent. It is also more natural because you set the properties on the
element you want to grow together with its other dimensions.

Thanks

Michal




reply via email to

[Prev in Thread] Current Thread [Next in Thread]