From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MtIUp-0006Kc-BB for mharc-grub-devel@gnu.org; Thu, 01 Oct 2009 06:02:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MtIUl-0006F5-AS for grub-devel@gnu.org; Thu, 01 Oct 2009 06:02:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MtIUf-00069G-UY for grub-devel@gnu.org; Thu, 01 Oct 2009 06:02:42 -0400 Received: from [199.232.76.173] (port=51604 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MtIUe-000693-Ni for grub-devel@gnu.org; Thu, 01 Oct 2009 06:02:37 -0400 Received: from mail-pz0-f175.google.com ([209.85.222.175]:41213) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MtIUe-0000ql-0d for grub-devel@gnu.org; Thu, 01 Oct 2009 06:02:36 -0400 Received: by pzk5 with SMTP id 5so4824180pzk.18 for ; Thu, 01 Oct 2009 03:02:35 -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=U2OL7X3VmP6mRIl+CeJVXFW6HhpMHYJTjv7yv2K9DCA=; b=dC22Mpimhu2zLx42zZZnuw/1V3VlA+iy4p1oS1bnHTAAdvi+gI3hNL6r0TUhpiEwxs mnvkoMkK/fK8DGORtOXcjxv9j1CDPMAahptywyEOEfiPhC9DqYO6IKPfmMRfU2XhFGkI FpVPonVSqNs1keMQJTdWn+WA1FDZwe/VI7Rd8= 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=O1jSHlwaO4/yFdaE3/SlYXMgO2MNs4O5LD+37NAcpdGEzWxbmW4JX0Qa/pPcrt2C+c 0b8yr7r3oyaJLBH78FfBhQEiHt1eVra6BdcydefvfBdYSn2lSP3gXCrStImrTpbH1Wpq zyScsoFtFfeu7NHo2/VT/U9Rw+jUYLWXy1Ag4= MIME-Version: 1.0 Received: by 10.140.162.20 with SMTP id k20mr76454rve.255.1254391355049; Thu, 01 Oct 2009 03:02:35 -0700 (PDT) In-Reply-To: References: Date: Thu, 1 Oct 2009 18:02:34 +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: Thu, 01 Oct 2009 10:02:44 -0000 Hi, Update: New properties for the layout manager: The previous version uses the simplified align and space property, but this is not enough for complete control, now it goes back to the previous four property valign, halign, vspace and hspace. Add extend property, if the children have different width/height, the menu looks a little awkward. When extend property is set, the width/height of children is the maximum value. Add min_width/max_width/min_height/max_height, it's used to limit the width/height calculated from children widgets. Width/Height set directly using property is not affected by these. When some of the margin property are not set, it's position is controlled by the parent alignment properties, for example, we can generate a OSX like dock with something like this: screen { halign = center panel { background = ",,blue,#32:,,green,#32" direction = left_to_right margin_bottom = 0 hspace = 10/0 vspace = 10/0 image { image = "/menu/ubuntu.png" } image { image = "/menu/debian.png" } image { image = "/menu/gentoo.png" } } } As panel only sets margin_bottom, it's x coordination can be set by screen. Now support four direction: left_to_right, right_to_left, top_to_bottom and bottom_to_top. The layout control function is moved from coreui.c to widget.c, now all container widget would inherit the layout manager automatically. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/