Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MirkQ-0007H1-Ed for mharc-grub-devel@gnu.org; Wed, 02 Sep 2009 11:27:46 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MirkO-0007GH-20 for grub-devel@gnu.org; Wed, 02 Sep 2009 11:27:44 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MirkM-0007Fi-F1 for grub-devel@gnu.org; Wed, 02 Sep 2009 11:27:43 -0400 Received: from [199.232.76.173] (port=56258 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MirkM-0007Fd-1T for grub-devel@gnu.org; Wed, 02 Sep 2009 11:27:42 -0400 Received: from fg-out-1718.google.com ([72.14.220.158]:13090) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MirkL-0008WU-Eq for grub-devel@gnu.org; Wed, 02 Sep 2009 11:27:41 -0400 Received: by fg-out-1718.google.com with SMTP id 22so389433fge.12 for ; Wed, 02 Sep 2009 08:27:37 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:sender:received:in-reply-to :references:date:x-google-sender-auth:message-id:subject:from:to :content-type:content-transfer-encoding; bh=On3/KiqfTm0DU6SRYafBjbjJkaIc3EjO5DbW9eYEMlM=; b=uh8JHWuQ7I2yI6zRwwSDIGePOuHJ0ZcsXx/5lOnognRmFmzoWeZPtz3xdIgkO0uks4 w2H56JB5f/Wj0vUMI5MEYPJzCbYTFpNPeTuD8HGx1aCTuqeP7R5HRgU0rwNcnD5YWEDP AY+rGr+JBNOwvHLvEGclwpH8mDT48ifUZ0hyo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:sender:in-reply-to:references:date :x-google-sender-auth:message-id:subject:from:to:content-type :content-transfer-encoding; b=CFAaOOxavlqOP9yv809RPKy5hcNvdPG+RZUze5N3rpKEQVcS0xMesXnfztycqgQn/z g+7N69c7jfPl2Sfr1uoiQo/J2ICxEgQ57wreUA4kmJcn3Wjc9uTIFFRmQ9tNdhcGjCZD 4drB6fVbEuZ4/d+gRfG8fFvSNlpxj/VqdO+pc= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.220.9 with SMTP id s9mr2685388fgg.40.1251905257397; Wed, 02 Sep 2009 08:27:37 -0700 (PDT) In-Reply-To: References: Date: Wed, 2 Sep 2009 17:27:37 +0200 X-Google-Sender-Auth: fd8d6783a9e8bef0 Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 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:27:44 -0000 2009/9/2 Bean : > On Wed, Sep 2, 2009 at 7:07 PM, Michal Suchanek wrot= e: >> Hello >> >> 2009/9/2 Bean : >> ... >>> =C2=A0+ box { >>> =C2=A0 =C2=A0+ screen { >>> =C2=A0 =C2=A0 =C2=A0bgimage =3D "splash.png" >>> =C2=A0 =C2=A0} >>> =C2=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), =C2=A0so the image > will fit screen automatically. if it's required, =C2=A0we 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 { >>> =C2=A0+ text { >>> =C2=A0 =C2=A0class =3D "header" >>> =C2=A0 =C2=A0x =3D 10 >>> =C2=A0 =C2=A0y =3D 10 >>> =C2=A0 =C2=A0text =3D "Welcome" >>> =C2=A0} >>> =C2=A0+ menu { >>> =C2=A0 =C2=A0x =3D 30 >>> =C2=A0 =C2=A0y =3D 30 >>> =C2=A0 =C2=A0width =3D 100 >>> =C2=A0 =C2=A0height =3D 100 >>> =C2=A0} >>> } >> >> With this kind of placement (x, y) how do you get >> =C2=A0- a menu with fixed number of components that scales to make best = use >> of available screen space >> =C2=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 >> =C2=A0- margins and borders to separate elements >> =C2=A0- alignment like left, right, center, decimal (could be probably u= sed >> for version as well) >> =C2=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 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 { > =C2=A0 =C2=A0x =3D 10% > =C2=A0 =C2=A0y =3D 10% > =C2=A0 =C2=A0width =3D 30% > =C2=A0 =C2=A0height =3D 30% > =C2=A0} > > 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