On Wed, Sep 2, 2009 at 7:07 PM, Michal Suchanek<hramr...@centrum.cz> wrote: > Hello > > 2009/9/2 Bean <bean12...@gmail.com>: > ... >> + 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. > >> >> + 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 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. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/ _______________________________________________ Grub-devel mailing list Grub-devel@gnu.org http://lists.gnu.org/mailman/listinfo/grub-devel