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: Mon, 5 Oct 2009 15:33:23 +0200

2009/10/5 Bean <address@hidden>:
> On Mon, Oct 5, 2009 at 5:07 PM, Michal Suchanek <address@hidden> wrote:
>> A panel should never be removed from layout management, it then
>> becomes pointless.
>>
>> A top-aligned panel should be done with alignment, and should be only
>> possible in horizontal panels like this:
>>
>> panel{
>>  direction = left_to_right
>>  panel{ id ="bb" ;valign = center}
>>  panel{ id ="bb" ; valign = top}
>>  panel{ id ="bb" ; valign = bottom}
>>  }
>> }
>>
>> In a top to bottom or bottom to top the first panel is aligned to
>> bottom/top side of the panel automatically.
>
> Hi,
>
> Actually, I just through of a possible issue with children assigned
> alignment. For the parent panel, there is a halign property, For
> example, if parent width is 50, each child's width is 10, there are
> three halign values:
>
> halign = right
> b1  b2  b3  empty
> 10  10  10  20
>
> halign = center
> b1  empty b2  empty  b3
> 10    10    10     10     10

This can be done with

  b1     hspace   b2       hspace     b3
  20%  20%       20%          20%   20%

but why would you want such spacing?

Normally you would want the panels take up most space possibly with
some small spacing or the outer panel shrink around the inner panels.

>
> halign = right

Perhaps use direction?
Why do you want the empty space there?

There are infinite possibilities of alignment so we should choose an
alignment method that allows for commonly used alignments and perhaps
some less common but useful, not all alignments that somebody can
possibly think of.

> empty b1  b2  b3
> 20      10  10   10
>
> halign is obviously not belonged to children, so you might write it as:
>
> panel{
>  direction = left_to_right
>  halign = center
>  panel{ id ="bb" ;valign = center}
>  panel{ id ="bb" ; valign = top}
>  panel{ id ="bb" ; valign = bottom}
>  }
> }
>
> But then there is problem, as panel can be children as well, for example:
>
> panel {
>  id = "top"
>  direction = top_to_bottom
>
> panel{
>  id = "aa"
>  direction = left_to_right
>  halign = center
>  panel{ id ="bb" ;valign = center}
>  panel{ id ="bb" ; valign = top}
>  panel{ id ="bb" ; valign = bottom}
>  }
> }
> }
>
> In this case, should halign of aa be used to control its own alignment
> from top, or that of its children ?

It should be used to align itself, obviously as you want to control
the alignment of each child separately and if halign = center was
applied to all this would not be possible.


Thanks

Michal




reply via email to

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