From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mv2gS-00045D-Cq for mharc-grub-devel@gnu.org; Tue, 06 Oct 2009 01:34:00 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mv2gP-00042L-Ga for grub-devel@gnu.org; Tue, 06 Oct 2009 01:33:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mv2gK-0003wv-SM for grub-devel@gnu.org; Tue, 06 Oct 2009 01:33:56 -0400 Received: from [199.232.76.173] (port=40342 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mv2gK-0003wV-Jb for grub-devel@gnu.org; Tue, 06 Oct 2009 01:33:52 -0400 Received: from mail-px0-f202.google.com ([209.85.216.202]:51853) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mv2gK-0002IA-5s for grub-devel@gnu.org; Tue, 06 Oct 2009 01:33:52 -0400 Received: by pxi40 with SMTP id 40so3900232pxi.24 for ; Mon, 05 Oct 2009 22:33:50 -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 :content-transfer-encoding; bh=F4w/nElAcDc34nUJOmCtcx6cI49giwUIjSMeXOcE5sU=; b=Iv/9XgE2JX0zrUpwv+2H5vK9Y9AILlcawWV5OdlmUDJdWSihv98zkaVf7tOxH7fxNL DtlFTaYb7aFZsw9tq3PaKCPejeGMt95WXnWm+TF94+Fy/KWeVCdpXOcQJhuLDewEi+qr 9qTEzRB7JTBo6CvKxDaYMs7KNUFY7Q2YhfKDY= 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:content-transfer-encoding; b=qnMFNGcQll8fjQVp/44OrvUZx3PAjQWzetQg37EPvIzHzyFokVplRWidfkiKrvnXqe mel61lfCTNw37tVZqJj3FqLwBTwPOlRER3NP7U71vGXgs2U3wh9X/LkOg3itEHHkK/UP ByEKhy62J3BGZCiLVXqwfaEwbKhkvr+i+JmIE= MIME-Version: 1.0 Received: by 10.140.164.20 with SMTP id m20mr115860rve.143.1254807230820; Mon, 05 Oct 2009 22:33:50 -0700 (PDT) In-Reply-To: References: <2e59e6970910040906o4cd536bancb2655c7301d69ec@mail.gmail.com> Date: Tue, 6 Oct 2009 13:33:50 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 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 05:33:58 -0000 On Mon, Oct 5, 2009 at 9:33 PM, Michal Suchanek wrote= : > 2009/10/5 Bean : >> On Mon, Oct 5, 2009 at 5:07 PM, Michal Suchanek wr= ote: >>> 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{ >>> =A0direction =3D left_to_right >>> =A0panel{ id =3D"bb" ;valign =3D center} >>> =A0panel{ id =3D"bb" ; valign =3D top} >>> =A0panel{ id =3D"bb" ; valign =3D bottom} >>> =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 =A0b2 =A0b3 =A0empty >> 10 =A010 =A010 =A020 >> >> halign =3D center >> b1 =A0empty b2 =A0empty =A0b3 >> 10 =A0 =A010 =A0 =A010 =A0 =A0 10 =A0 =A0 10 > > This can be done with > > =A0b1 =A0 =A0 hspace =A0 b2 =A0 =A0 =A0 hspace =A0 =A0 b3 > =A020% =A020% =A0 =A0 =A0 20% =A0 =A0 =A0 =A0 =A020% =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. >> empty b1 =A0b2 =A0b3 >> 20 =A0 =A0 =A010 =A010 =A0 10 >> >> halign is obviously not belonged to children, so you might write it as: >> >> panel{ >> =A0direction =3D left_to_right >> =A0halign =3D center >> =A0panel{ id =3D"bb" ;valign =3D center} >> =A0panel{ id =3D"bb" ; valign =3D top} >> =A0panel{ id =3D"bb" ; valign =3D bottom} >> =A0} >> } >> >> But then there is problem, as panel can be children as well, for example= : >> >> panel { >> =A0id =3D "top" >> =A0direction =3D top_to_bottom >> >> panel{ >> =A0id =3D "aa" >> =A0direction =3D left_to_right >> =A0halign =3D center >> =A0panel{ id =3D"bb" ;valign =3D center} >> =A0panel{ id =3D"bb" ; valign =3D top} >> =A0panel{ id =3D"bb" ; valign =3D bottom} >> =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. --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/