Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MirZW-0000Zg-Gu for mharc-grub-devel@gnu.org; Wed, 02 Sep 2009 11:16:30 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MirZU-0000Yp-Km for grub-devel@gnu.org; Wed, 02 Sep 2009 11:16:28 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MirZR-0000UD-06 for grub-devel@gnu.org; Wed, 02 Sep 2009 11:16:28 -0400 Received: from [199.232.76.173] (port=50412 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MirZQ-0000Tv-GZ for grub-devel@gnu.org; Wed, 02 Sep 2009 11:16:24 -0400 Received: from mail-pz0-f189.google.com ([209.85.222.189]:42170) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MirZQ-0006I0-74 for grub-devel@gnu.org; Wed, 02 Sep 2009 11:16:24 -0400 Received: by pzk27 with SMTP id 27so868308pzk.9 for ; Wed, 02 Sep 2009 08:16:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:content-type :content-transfer-encoding; bh=ZPXzej7gf8IrhSRLNRLMrrilFfyQN/4WQjmZjpy5ezI=; b=tYQuMAR029BqCgiPwf2W7dKmUa4rDij1ksvWDMaifeFZgtMp0Gs+vCWW9NNfZzMs2v 9gLc08XMgM8LRRmsdIU9NI4COeNb7MTT2IQ7ev1JqLbXv8XFP8qOxT/sFBl7FOd28yG9 ilIfrNDp5+lzouPhLGaPyTM0NC3z83GMYIW64= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; b=kDdCe8AspYVRV6tdlm+AshBJLDih3BII2cqiUuiwU8ohUMukPayH/i8+V0SoqImdGm 45VM4hqUNz9nDIx7jhhcmvE5a/ffcRzIKsrcAnKtWBvPL8hN4dBjUscPXTcq2IArUbXt xfRUJBkzVJmO6a6pm09Z6tobRZz/K+SeGl1iY= MIME-Version: 1.0 Received: by 10.141.2.5 with SMTP id e5mr2432809rvi.134.1251904571039; Wed, 02 Sep 2009 08:16:11 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Sep 2009 23:16:11 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 02 Sep 2009 15:16:28 -0000 On Wed, Sep 2, 2009 at 7:07 PM, Michal Suchanek wrote: > Hello > > 2009/9/2 Bean : > ... >> =A0+ box { >> =A0 =A0+ screen { >> =A0 =A0 =A0bgimage =3D "splash.png" >> =A0 =A0} >> =A0} >> } > > 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 { >> =A0+ text { >> =A0 =A0class =3D "header" >> =A0 =A0x =3D 10 >> =A0 =A0y =3D 10 >> =A0 =A0text =3D "Welcome" >> =A0} >> =A0+ menu { >> =A0 =A0x =3D 30 >> =A0 =A0y =3D 30 >> =A0 =A0width =3D 100 >> =A0 =A0height =3D 100 >> =A0} >> } > > With this kind of placement (x, y) how do you get > =A0- a menu with fixed number of components that scales to make best use > of available screen space > =A0- 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 > =A0- margins and borders to separate elements > =A0- alignment like left, right, center, decimal (could be probably used > for version as well) > =A0- 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 =3D 10% y =3D 10% width =3D 30% height =3D 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. --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/