Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MpkJO-0001ZI-Py for mharc-grub-devel@gnu.org; Mon, 21 Sep 2009 10:56:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MpkJN-0001WN-5C for grub-devel@gnu.org; Mon, 21 Sep 2009 10:56:17 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MpkJI-0001Pd-Se for grub-devel@gnu.org; Mon, 21 Sep 2009 10:56:16 -0400 Received: from [199.232.76.173] (port=33675 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MpkJI-0001P7-KS for grub-devel@gnu.org; Mon, 21 Sep 2009 10:56:12 -0400 Received: from mail-px0-f183.google.com ([209.85.216.183]:38594) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MpkJI-0001ti-1o for grub-devel@gnu.org; Mon, 21 Sep 2009 10:56:12 -0400 Received: by pxi13 with SMTP id 13so94851pxi.6 for ; Mon, 21 Sep 2009 07:56:10 -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; bh=zARNWElqHmB/LUM0Dd9ge8BqgLkEH2wTBywoXHJkKb4=; b=r0881qUU955rXe4J2BxxON20QLpV7duFjXffaGFnF0UUNLSyYWvwWNAIBnDCgQmeOX D8bFkmhDbgCSIwGq+5iBKFHQGUKliy/WETr39kZT70aq6z/TEOhYX8VhJUv7f30+rpzy eGhfKQVxM6BxLhLk8Mb7DGNOA3EnhelUW9mWg= 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; b=gq878iKxisMKpNMtrmUC+omJcM4nNcF411TYoC07aTvLM4F+mkmY1M9k3ttMVffelg vd20u98Hepu2Yu2mrlP6NYQOkS5rI+2V/VpfPTwfkzyiHMAz+c+D/CrZxYHuyld4N7f2 hV4hrOLPKv1Gq8xWtF3bARnwX1WyfSKg4bh8Q= MIME-Version: 1.0 Received: by 10.140.127.20 with SMTP id z20mr237036rvc.186.1253544970447; Mon, 21 Sep 2009 07:56:10 -0700 (PDT) In-Reply-To: References: Date: Mon, 21 Sep 2009 22:56:10 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] New menu interface (implementation) 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: Mon, 21 Sep 2009 14:56:17 -0000 On Mon, Sep 21, 2009 at 5:16 PM, Michal Suchanek wrote: > 2009/9/20 Bean : >> On Sun, Sep 20, 2009 at 4:30 PM, Michal Suchanek wrote: >>> >>> So the text region is intended for drawing on text screen and the >>> graphics region on graphics screen. I assume the check for pure text >>> mode is there to choose which one is used. >>> >>> However, wouldn't this switch in coordinate system complicate further >>> extending of the menu system with additional components? >>> >>> With these different coordinates every compound component would likely >>> have to check which kind of rectangle is currently in use. >>> >>> Still it might work - borders have to be drawn differently, pictures >>> currently don't work, and alignment should work with any units (and >>> it's easier to see rounding errors if the units are large). >>> >>> There is slight issue with element placement, though, If somebody uses >>> pixel coordinates for placing elements then the offsets will suddenly >>> become huge in text mode. Shouldn't the layouts be more portable? >> >> Hi, >> >> I'm thinking about using the "c" unit as default, as it's usable in >> both text and graphic mode, this would help to create portable config >> file. If user really want to use pixel unit, he can add "p" suffix, >> such as 100p. > > What does c mean in graphics mode? I can see that in text mode it's > one character cell in either direction but there is no such thing in > graphics mode be cause different fonts and even different letters of > the same font have different character cells. > > What would be especially confusing when using such a unit is that most > fonts (except perhaps CJK) have different character width and height > so does this mean the average (maximum, ,,) width of a character, > height of a character, or a different thing depending on the direction > in which the unit is used (vertical, horizontal)? Hi, In graphic mode, 'c' unit is the width/height of the reference character ( I use 'O' as reference character in menu_test.c) using system default font, this ensure that 1c is always the same size in the current system. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/