[Top][All Lists]

[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: Fri, 9 Oct 2009 13:48:46 +0200

2009/10/9 Bean <address@hidden>:
> On Fri, Oct 9, 2009 at 5:46 AM, Michal Suchanek <address@hidden> wrote:
>> 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.
> Hi,
> What if more than one children has the extend property, for example,
> how do we handle config like this:
> panel {
>  panel { halign="extend" }
>  panel { }
>  panel { halign="extend"}
>  panel { }
> }

Then both get a share of the available space, obviously. It's similar
to your extend=all but each child can opt to get a share of the extra
space individually.



reply via email to

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