Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Miv78-0002AU-F4 for mharc-grub-devel@gnu.org; Wed, 02 Sep 2009 15:03:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Miv76-0002A0-Rn for grub-devel@gnu.org; Wed, 02 Sep 2009 15:03:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Miv72-00027h-7l for grub-devel@gnu.org; Wed, 02 Sep 2009 15:03:24 -0400 Received: from [199.232.76.173] (port=33362 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Miv72-00027c-3D for grub-devel@gnu.org; Wed, 02 Sep 2009 15:03:20 -0400 Received: from mail-pz0-f200.google.com ([209.85.222.200]:57675) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Miv71-00077j-Dz for grub-devel@gnu.org; Wed, 02 Sep 2009 15:03:19 -0400 Received: by pzk38 with SMTP id 38so1015613pzk.5 for ; Wed, 02 Sep 2009 12:03:15 -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=Iau4m+sALJD1wwG2K/gELre8G7scO7QAAWki+OXbjjY=; b=ZvqgEKaVyTrbB/ENNSbv5nVfVfaGAR69OyIOCOS0JrwwOYBzNIvhE4o7/S+YkZlbaa /HwCiR+n2SyumCg5fSXwdcUtxOLeE/OSXPL6hrtNxMOw/bhDas+6x7wMD+Oa3u7wDegH +3ofK2ywg9/22kgLF7Y7Isz7TURNWho9vUzdc= 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=BjbqaT+TpERpnkKN42id8kK9lwMK74taWInPQigp9xG2j/KDtiLMTfG69i2QT195OY 6UBpXigUP8zjKuJX11FapQJadb/mVBGssf3RnjLPsm2Qghvle1um9QWcziu+QGyDNsQP sa1QWEbiOJeGpqrOZtWPEGUaSuZLcGUhHcMis= MIME-Version: 1.0 Received: by 10.141.18.15 with SMTP id v15mr2493959rvi.297.1251918189024; Wed, 02 Sep 2009 12:03:09 -0700 (PDT) In-Reply-To: References: Date: Thu, 3 Sep 2009 03:03:09 +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 19:03:25 -0000 On Thu, Sep 3, 2009 at 1:25 AM, Michal Suchanek wrote: > 2009/9/2 Bean : >> On Wed, Sep 2, 2009 at 11:27 PM, Michal Suchanek wr= ote: >>> How will it fit screen? What if the image is 4:3 and =A0the screen is >>> 5:4 or widescreen? >> >> It'd scale to fit the new proportion, although the image perhaps won't >> look nice in this case. We could choose one of the following rendering >> method based on option: >> >> Center >> Scaling (full) >> Scaling (keep ratio) >> Tiling > > Other common uses are > > Scaling (cover) - keep aspect but cover the whole area (with parts of > the picture sticking out of the viewport) - useful with a > non-intrusive background like a photo of fallen leaves or the like > > Left, Right, TopLeft, BottomRight, ... - for side and corner decorations. Hi, Sounds good, and it shouldn't be difficult to implement. > >> >>> Percentages are a good start. However, if you make your menu >>> percentage based adding new items or new menu areas is still >>> problematic. >> >> Actually I've though of another representation, using the font metrics >> as base unit, =A0something like this: >> >> + menu { >> =A0x =3D 10% >> =A0y =3D 10% >> =A0width =3D 30c >> =A0height =3D 30c >> } > > Does that c represent the width of the character "c"? What about > proportional fonts? The suffix c means character. For proportional fonts, it's the average width of font used by the current component. > > I think it is OK if the layout manager was in Lua if that makes > hacking on it easier but you still need the support functions for a > fully functional layout manager in C for that to work. Yeah, I think it'd be better to implement to whole framework in C at first. LUA could be used to write custom component that extends the function of existing components. --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/