From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mw0oy-00019U-8C for mharc-grub-devel@gnu.org; Thu, 08 Oct 2009 17:46:48 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mw0ov-00018b-PY for grub-devel@gnu.org; Thu, 08 Oct 2009 17:46:45 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mw0ou-000183-QK for grub-devel@gnu.org; Thu, 08 Oct 2009 17:46:45 -0400 Received: from [199.232.76.173] (port=38907 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mw0ou-00017s-KP for grub-devel@gnu.org; Thu, 08 Oct 2009 17:46:44 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:16146) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mw0ou-0004Ll-76 for grub-devel@gnu.org; Thu, 08 Oct 2009 17:46:44 -0400 Received: by fg-out-1718.google.com with SMTP id 22so2028937fge.12 for ; Thu, 08 Oct 2009 14:46:41 -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; bh=GdKugoov8nWwdTl+65OcR+LnytrFXwkdfgh0Ngk9AnE=; b=smrUO3ESLkV+w7SBeEq0xj/g7pXaF43YkVOLgAXVsQ3yaxNyGBtZOE+sgETpCbmCz/ kIptPXTIp+umoOeUzRs4ky75iSZiVncpNus6AoXiFRX+vSjDe9Mte3op5yaJysC6Nyk4 KUD9W0FEqWJZspyNPSTTw4w+WttUdJZtYZxZM= 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; b=VNnj9Bhn8+WdKMCOwe3Gx3SO6ITrlIW2JAzavKo4N76Ymoxg/4PfsgsfgCU6roDSD/ iczY98rYa4YEGRNb7OBOq1dfB4K5phOdUzaefUmJ/NkcjC89e3MJwuLt4JzCxYkU40+A BX+f8RsQGqWeXxHey6doS8a6FSWdadX43+4RI= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.240.9 with SMTP id n9mr1662451fgh.70.1255038398895; Thu, 08 Oct 2009 14:46:38 -0700 (PDT) In-Reply-To: References: Date: Thu, 8 Oct 2009 23:46:38 +0200 X-Google-Sender-Auth: 4b9c14a8cee7d956 Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 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, 08 Oct 2009 21:46:46 -0000 2009/10/8 Bean : > On Thu, Oct 8, 2009 at 7:18 PM, Michal Suchanek wrote: >>> 2, You should use far position as you want to extend the widget at the >>> far side (top). >> >> This dependency is a problem. The rules for creating a working layout >> are then complicated and hard to understand. >> >> Also I have no idea why I should set position on the screen, it is >> never positioned. > > Hi, > > For example, if parent width=10, two children, width=4, then the > extend property decide how to assign the extra 2 space: > > extend=first, space is added to first widget, which is 6,4 > extend=all, space is distributed to alls widget, which is 5,5 > extend=last, space is added to last widget, which is 4,6 This should not be necessary. The default is to wrap the children with any spacing the children specify. This should work nicely for layouts similar to the current gfxterm. If the panel is larger (because it is itself extended or fixed-width) then children are packed at the start (which is determined by direction). This should work nicely for buttons in a dialog box, for example. If a dialog has two buttons they should be placed together, placing one on each end can easily lead to situation when the user notices only one of the buttons. If you want to explicitly control which children get the available space then finer granularity is again achieved by setting properties on the chidren. Any child that has the expand property will take a share of the surplus space. If you want children to take space without growing add another property which specifies that the space should be taken without expanding the element. For example, gtk2 has properties expand and fill. Expand means that the element will take surplus space and fill means that the element enlarges to fill the surplus space. With these properties you can specify that third element out of four can get extra space which is not available with extend property on the parent. It is also more natural because you set the properties on the element you want to grow together with its other dimensions. Thanks Michal