Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mv6gd-000458-IF for mharc-grub-devel@gnu.org; Tue, 06 Oct 2009 05:50:27 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mv6ga-00044H-PY for grub-devel@gnu.org; Tue, 06 Oct 2009 05:50:24 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mv6gZ-00043p-Lq for grub-devel@gnu.org; Tue, 06 Oct 2009 05:50:23 -0400 Received: from [199.232.76.173] (port=33691 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mv6gZ-00043g-E5 for grub-devel@gnu.org; Tue, 06 Oct 2009 05:50:23 -0400 Received: from fg-out-1718.google.com ([72.14.220.156]:36660) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mv6gY-0001ox-Oe for grub-devel@gnu.org; Tue, 06 Oct 2009 05:50:23 -0400 Received: by fg-out-1718.google.com with SMTP id 22so1274336fge.12 for ; Tue, 06 Oct 2009 02:50:21 -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:content-transfer-encoding; bh=EPEVmYPUoXi73QCKImIpz8syqXdkBSn83aXrJY76oLc=; b=ooH2z9cyKJUOzbTwQJrMLiV0XDs/DNc56dMSbPHyGUmbBEPzmWESWnnIXJDVcpHGxQ OR8uQEdux0TnOJiDDzYneYZN335uK2nifKNqJxJslw6y94i4Gk0rf2qHIl6lc13w9wOs JBrSMA2prXj2KDd/xTMvnbzPfYGyW3sVVwfAw= 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 :content-transfer-encoding; b=E8OBXDKfnbjbebzEh2P+DIHdBHm9J+WZlsOnBMFBJTFBlPGNt9HSbzzIp4Gt/U69RW xEaG9JhJK6LMHJ7OOVg8TWqDIK3AWgL1xMS/t87lbrNyQ6k9x3XM3f6JVMwJc7gJsUuY 7D4zhiOm8Mt9UJwPD2jB8LIfRiDFq4+f8b/yo= MIME-Version: 1.0 Sender: hramrach@gmail.com Received: by 10.86.187.38 with SMTP id k38mr416148fgf.5.1254822621248; Tue, 06 Oct 2009 02:50:21 -0700 (PDT) In-Reply-To: References: Date: Tue, 6 Oct 2009 11:50:21 +0200 X-Google-Sender-Auth: 1641418c49e59d0c Message-ID: From: Michal Suchanek To: The development of GRUB 2 Content-Type: text/plain; charset=UTF-8 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 (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: Tue, 06 Oct 2009 09:50:25 -0000 2009/10/6 Bean : > On Mon, Oct 5, 2009 at 9:33 PM, Michal Suchanek wro= te: >> 2009/10/5 Bean : >>> On Mon, Oct 5, 2009 at 5:07 PM, Michal Suchanek w= rote: >>>> A panel should never be removed from layout management, it then >>>> becomes pointless. >>>> >>>> A top-aligned panel should be done with alignment, and should be only >>>> possible in horizontal panels like this: >>>> >>>> panel{ >>>> =C2=A0direction =3D left_to_right >>>> =C2=A0panel{ id =3D"bb" ;valign =3D center} >>>> =C2=A0panel{ id =3D"bb" ; valign =3D top} >>>> =C2=A0panel{ id =3D"bb" ; valign =3D bottom} >>>> =C2=A0} >>>> } >>>> >>>> In a top to bottom or bottom to top the first panel is aligned to >>>> bottom/top side of the panel automatically. >>> >>> Hi, >>> >>> Actually, I just through of a possible issue with children assigned >>> alignment. For the parent panel, there is a halign property, For >>> example, if parent width is 50, each child's width is 10, there are >>> three halign values: >>> >>> halign =3D right >>> b1 =C2=A0b2 =C2=A0b3 =C2=A0empty >>> 10 =C2=A010 =C2=A010 =C2=A020 >>> >>> halign =3D center >>> b1 =C2=A0empty b2 =C2=A0empty =C2=A0b3 >>> 10 =C2=A0 =C2=A010 =C2=A0 =C2=A010 =C2=A0 =C2=A0 10 =C2=A0 =C2=A0 10 >> >> This can be done with >> >> =C2=A0b1 =C2=A0 =C2=A0 hspace =C2=A0 b2 =C2=A0 =C2=A0 =C2=A0 hspace =C2= =A0 =C2=A0 b3 >> =C2=A020% =C2=A020% =C2=A0 =C2=A0 =C2=A0 20% =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A020% =C2=A0 20% >> >> but why would you want such spacing? >> >> Normally you would want the panels take up most space possibly with >> some small spacing or the outer panel shrink around the inner panels. >> >>> >>> halign =3D right >> >> Perhaps use direction? >> Why do you want the empty space there? >> >> There are infinite possibilities of alignment so we should choose an >> alignment method that allows for commonly used alignments and perhaps >> some less common but useful, not all alignments that somebody can >> possibly think of. >> > > Hi, > > Consider the outer box as screen, whose size is fixed. If we want the > panels to span the whole screen instead of cluster at the left side, > then halign is quite useful, you can check out the demo to see how the > windows are placed. You wrap them in a panel and center that. If there is any content that would use the space it uses it. If not they stay in the center. If you really insist on spreading several panels over the screen I suggest panel properties that solve this problem: homogenous and stretch. homogenous allocates equal space to each child regardless of its size. Child alignment strategy can then be used to determine where to put the child in the allocated space in case it is larger/smaller than required. stretch inserts equal spacing between its children. This could be possibly a special spacing value. Given that we have unidirectional panels now perhaps we should reduce vspace/hspace to a single property. > >>> empty b1 =C2=A0b2 =C2=A0b3 >>> 20 =C2=A0 =C2=A0 =C2=A010 =C2=A010 =C2=A0 10 >>> >>> halign is obviously not belonged to children, so you might write it as: >>> >>> panel{ >>> =C2=A0direction =3D left_to_right >>> =C2=A0halign =3D center >>> =C2=A0panel{ id =3D"bb" ;valign =3D center} >>> =C2=A0panel{ id =3D"bb" ; valign =3D top} >>> =C2=A0panel{ id =3D"bb" ; valign =3D bottom} >>> =C2=A0} >>> } >>> >>> But then there is problem, as panel can be children as well, for exampl= e: >>> >>> panel { >>> =C2=A0id =3D "top" >>> =C2=A0direction =3D top_to_bottom >>> >>> panel{ >>> =C2=A0id =3D "aa" >>> =C2=A0direction =3D left_to_right >>> =C2=A0halign =3D center >>> =C2=A0panel{ id =3D"bb" ;valign =3D center} >>> =C2=A0panel{ id =3D"bb" ; valign =3D top} >>> =C2=A0panel{ id =3D"bb" ; valign =3D bottom} >>> =C2=A0} >>> } >>> } >>> >>> In this case, should halign of aa be used to control its own alignment >>> from top, or that of its children ? >> >> It should be used to align itself, obviously as you want to control >> the alignment of each child separately and if halign =3D center was >> applied to all this would not be possible. > > Right, perhaps it's more natural that the valign/halign are used for > the widget itself, but I still think it's useful to control parent's > alignment strategy, perhaps with a new property. We already have properties for controlling this strategy: - direction - hspace/vspace (spacing) - inner_space (padding) - outer_space on the children (margin) Thanks Michal