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: Bean
Subject: Re: [GITGRUB] New menu interface (implementation)
Date: Mon, 5 Oct 2009 18:35:46 +0800

On Mon, Oct 5, 2009 at 5:07 PM, Michal Suchanek <address@hidden> wrote:
> 2009/10/5 Bean <address@hidden>:
>> On Mon, Oct 5, 2009 at 6:20 AM, Michal Suchanek <address@hidden> wrote:
>>> Hello
>>>
>>> I tried to get some borders into the previous demo but I got overlapping 
>>> panels.
>>>
>>> This should not happen because it is not supported. That's what the
>>> layout manager is for.
>>
>> Hi,
>>
>> I think you misunderstand the meaning of margin_* properties. It means
>> that the widget is always at a constant distance from parent widget.
>> Once it's set, their position is fixed, it's not subject to the layout
>> manger. This is used to create sticky panels like docks. For example:
>>
>> panel
>> {
>>  panel { id="aa" margin_bottom=0 }
>>  panel { id="bb" }
>>  panel { id="cc" }
>>  panel { id="dd"}
>> }
>>
>> aa's location is fixed, bb, cc and dd's location is calculated by the
>> panel, they can overlap with aa.
>>
>> The sticky panel also doesn't move when view port is scrolled to
>> display active item.
>
> No, dock is easily created like
>
> panel
> {
>  panel { id="aa" margin_bottom=0 }
>  panel {
>  panel { id="bb" }
>  panel { id="cc" }
>  panel { id="dd"}
>  }
> }
>
> A panel should never be removed from layout management, it then
> becomes pointless.

Hi,

Sometimes it's useful to have absolute address, for example to adjust
the window according to the background image, it's quite tricky to do
this with dynamic positioning. If you want everything to be controlled
by the layout manger, just don't use the property and wrap panels
around widgets.

>From your previous description, I think your meaning of margin is some
kind of space left around the border of panel, I think that could be
useful as well, but perhaps with a different name, I'm considering the
following properties:

inner_left, inner_right, inner_top, inner_bottom: space reserved
inside the border
outer_left, outer_right, outer_top, outer_bottom: space reserved
outside the border

Perhaps the naming of margin_* property is a little misleading,
perhaps I can rename them distance_* to remind it they're used as
fixed distance to borders of parent.

>
> 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.

In the currently implementation, valign is for the parent widget

 panel{
  direction = left_to_right
  valign = center
  panel{ id ="bb"}
  panel{ id ="bb"}
  panel{ id ="bb"}
  }
 }

Align all child vertically, but I guess this can be implemented per child.

-- 
Bean

gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/




reply via email to

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