From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MrCz8-0005iu-6D for mharc-grub-devel@gnu.org; Fri, 25 Sep 2009 11:45:26 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MrCz6-0005ha-5t for grub-devel@gnu.org; Fri, 25 Sep 2009 11:45:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MrCz1-0005eB-HZ for grub-devel@gnu.org; Fri, 25 Sep 2009 11:45:23 -0400 Received: from [199.232.76.173] (port=44856 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MrCz1-0005dw-39 for grub-devel@gnu.org; Fri, 25 Sep 2009 11:45:19 -0400 Received: from mail-px0-f178.google.com ([209.85.216.178]:37199) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MrCyv-0006OR-1D for grub-devel@gnu.org; Fri, 25 Sep 2009 11:45:14 -0400 Received: by pxi8 with SMTP id 8so3468361pxi.27 for ; Fri, 25 Sep 2009 08:45:07 -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=JoMzfyr6CYnske5z/SUQN3vBErXN8IclSZb0KYKr9mE=; b=bU0hU6LaYjh7DdvmIX59fN/hMJvRjH3qsD9p40I+s0pl7QvcdIfg/bI+oNtjiVIy0A K+M7d2Hiz7wGj5sFxnPLYsXtd6HOSdjDjswT4aFRSmwD6BTD6DmGVy363Mu9rKxDHqT0 D0pNNoN8MP3Gn/TBRhB4LzopDix4ogNy5zRbc= 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=bOJUXsVaJ0qVRbEkBng7UR+iaVOiFAVYVLA+cjf6/SH+Or1tICEOMy7kY0uvlN5wps TXBOo8F/cxXjS4kwPjL6tM61tYEg+hka0+ssfVTQiG90m2E1piYiLCizOT5UtjCDVJkC GkxFrZa1K9N+azy+aOacI/8wkH5vE2DTlk5Do= MIME-Version: 1.0 Received: by 10.140.187.21 with SMTP id k21mr13437rvf.274.1253893505247; Fri, 25 Sep 2009 08:45:05 -0700 (PDT) In-Reply-To: References: Date: Fri, 25 Sep 2009 23:45:05 +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: Fri, 25 Sep 2009 15:45:24 -0000 Hi, Update: Some adjustment to data representation. For example: background = "/splash.png" means loads splash.png, no extra handling if loading fails (text mode or file not found) background = "/splash.png,,blue" means loads splash.png, if it fails, replace it with rect that has blue background Add new number format to specify size for both graphic and text mode: space = 10/0 10 pixel in graphic text, 0 in text mode New layout manger, it support the following parameters: columns valign halign width height vspace hspace vmargin hmargin width/height is the size of widget, if it's not set, the size is calculated automatically using the size of child widgets vmargin, hmargin is the distance between horizontal and vertical border, positive value is from left/top, while negative value is from right/bottom, for example: panel { vmargin = -0 hmargin = -0 } places the panel in the bottom right corner. Here is a sample config file that shows different valign/halign combination, the image file is inside the previous menu.zip. screen { halign = "center" valign = "center" columns = 3 background = "/menu/back.png" panel { background = ",blue" hspace = 10/0 vspace = 5/0 halign = left valign = top width = 28% height = 28% label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } panel { background = ",blue" hspace = 10/0 vspace = 5/0 halign = center valign = top width = 28% height = 28% label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } panel { background = ",blue" hspace = 10/0 vspace = 5/0 halign = right valign = top width = 28% height = 28% label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } panel { background = ",blue" hspace = 10/0 vspace = 5/0 halign = left valign = center width = 28% height = 28% label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } panel { background = ",blue" hspace = 10/0 vspace = 5/0 halign = center valign = center width = 28% height = 28% label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } panel { background = ",blue" hspace = 10/0 vspace = 5/0 halign = right valign = center width = 28% height = 28% label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } panel { background = ",blue" hspace = 10/0 vspace = 5/0 halign = left valign = bottom width = 28% height = 28% label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } panel { background = ",blue" hspace = 10/0 vspace = 5/0 halign = center valign = bottom width = 28% height = 28% label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } panel { top_left = "/menu/menu_tl.png,,black/cyan/#0x250F" top = "/menu/menu_t.png,tiling,black/cyan/#0x2501" top_right = "/menu/menu_tr.png,,black/cyan/#0x2513" left = "/menu/menu_l.png,tiling,black/cyan/#0x2503" right = "/menu/menu_r.png,tiling,black/cyan/#0x2503" bottom_left = "/menu/menu_bl.png,,black/cyan/#0x2517" bottom = "/menu/menu_b.png,tiling,black/cyan/#0x2501" bottom_right = "/menu/menu_br.png,tiling,black/cyan/#0x251B" background = ",blue" hspace = 10/0 vspace = 5/0 halign = right valign = bottom hmargin = -0 vmargin = -0 label { color = "light-red/cyan" text = "AA" space = 1 } label { color = "yellow/cyan" text = "BBBBBB" space = 1 } label { color = "light-magenta/cyan" text = "CCCC" space = 1 } } } -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/