grub-devel
[Top][All Lists]
Advanced

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

Re: [GITGRUB] New menu interface


From: Michal Suchanek
Subject: Re: [GITGRUB] New menu interface
Date: Wed, 2 Sep 2009 17:27:37 +0200

2009/9/2 Bean <address@hidden>:
> On Wed, Sep 2, 2009 at 7:07 PM, Michal Suchanek<address@hidden> wrote:
>> Hello
>>
>> 2009/9/2 Bean <address@hidden>:
>> ...
>>>  + box {
>>>    + screen {
>>>      bgimage = "splash.png"
>>>    }
>>>  }
>>> }
>>
>> Where would this image get displayed? It's highly unlikely it would
>> have the same resolution as the screen box.
>
> We have image scaling support (Colin's pending patch),  so the image
> will fit screen automatically. if it's required,  we could also add
> another option to use tiling instead of scaling.

How will it fit screen? What if the image is 4:3 and  the screen is
5:4 or widescreen?

>
>>
>>>
>>> + screen {
>>>  + text {
>>>    class = "header"
>>>    x = 10
>>>    y = 10
>>>    text = "Welcome"
>>>  }
>>>  + menu {
>>>    x = 30
>>>    y = 30
>>>    width = 100
>>>    height = 100
>>>  }
>>> }
>>
>> With this kind of placement (x, y) how do you get
>>  - a menu with fixed number of components that scales to make best use
>> of available screen space
>>  - a scrollable menu with fixed font size that accomodates as many
>> items on the screen as reasonably possible (within some layout
>> constraints such as text/menu borders)
>>
>> In my view the typical requirements are
>>  - margins and borders to separate elements
>>  - alignment like left, right, center, decimal (could be probably used
>> for version as well)
>>  - relative alignment like below, right-of, .. or packing like
>> three-column, 2-span, etc.
>>
>> Specifying pixel coordinates for each item separately is
>> counter-productive and typically not what you want.
>
> This feature looks good, but I think it'd be too complicated for the
> initial version. IMO, we should have a working solution first, then

IMHO we have a working solution now: gfxterm, and it's time to specify
what the next version is supposed to do and what is not required for
grub. Then it will be obvious where we can cut corners to make the
menu sufficient but not overly complex.

> improve on it. To support screen relative position, we could use
> something like this:
>
> + menu {
>    x = 10%
>    y = 10%
>    width = 30%
>    height = 30%
>  }
>
> The percentage are calculated using the width/height of parent component.
>
> Later, we can add layout manager that calculate the position of
> individual component.

Percentages are a good start. However, if you make your menu
percentage based adding new items or new menu areas is still
problematic.

Thanks

Michal




reply via email to

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