From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Mukv9-0006xS-6J for mharc-grub-devel@gnu.org; Mon, 05 Oct 2009 06:35:59 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Mukv3-0006rA-Re for grub-devel@gnu.org; Mon, 05 Oct 2009 06:35:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Mukuy-0006lx-N7 for grub-devel@gnu.org; Mon, 05 Oct 2009 06:35:52 -0400 Received: from [199.232.76.173] (port=42663 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Mukuy-0006lc-7u for grub-devel@gnu.org; Mon, 05 Oct 2009 06:35:48 -0400 Received: from mail-px0-f202.google.com ([209.85.216.202]:56551) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Mukux-0003Dx-H2 for grub-devel@gnu.org; Mon, 05 Oct 2009 06:35:47 -0400 Received: by pxi40 with SMTP id 40so3074539pxi.24 for ; Mon, 05 Oct 2009 03:35:46 -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=SChojMdPe6jR4HmPqZmpWdOLJ8kJ5b5TDJNMFO9E50E=; b=LXKtpc8QQhoxm/DNw7P/B4JJ+WYeyKaeieRbqG3s8FOtm0XItBMW0et/DUCBp8hCQZ VqLV3pv6dGjR9dOuunEDZMGJtr+G13YP1pzT5p0Pdup2poAaCZ4FZS50SBPSashEwmaB HRNl4xSJ18Xo7T3lu+HdF2YX9E2Wm2L9UzcBQ= 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=Tp+6sszQle2695nM6fLYdddwAb5sVjgsX1MxPZbqFkm/+Z70G8d00H3APKkxhe04db fq/RMa+17f7Vf+iYECpQ4EX5CotAUV0bDzzHjvTdqxQgaHhNg0mBphChYKjqYGMGbjBn C/PV5vTVQKwnBIHRhNNG1IoaK9Dq0a2oG8hKI= MIME-Version: 1.0 Received: by 10.140.127.21 with SMTP id z21mr877804rvc.147.1254738946767; Mon, 05 Oct 2009 03:35:46 -0700 (PDT) In-Reply-To: References: <2e59e6970910040906o4cd536bancb2655c7301d69ec@mail.gmail.com> Date: Mon, 5 Oct 2009 18:35:46 +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: Mon, 05 Oct 2009 10:35:54 -0000 On Mon, Oct 5, 2009 at 5:07 PM, Michal Suchanek wrote= : > 2009/10/5 Bean : >> On Mon, Oct 5, 2009 at 6:20 AM, Michal Suchanek wr= ote: >>> Hello >>> >>> I tried to get some borders into the previous demo but I got overlappin= g panels. >>> >>> This should not happen because it is not supported. That's what the >>> layout manager is for. >> >> Hi, >> >> I think you misunderstand the meaning of margin_* properties. It means >> that the widget is always at a constant distance from parent widget. >> Once it's set, their position is fixed, it's not subject to the layout >> manger. This is used to create sticky panels like docks. For example: >> >> panel >> { >> =A0panel { id=3D"aa" margin_bottom=3D0 } >> =A0panel { id=3D"bb" } >> =A0panel { id=3D"cc" } >> =A0panel { id=3D"dd"} >> } >> >> aa's location is fixed, bb, cc and dd's location is calculated by the >> panel, they can overlap with aa. >> >> The sticky panel also doesn't move when view port is scrolled to >> display active item. > > No, dock is easily created like > > panel > { > =A0panel { id=3D"aa" margin_bottom=3D0 } > =A0panel { > =A0panel { id=3D"bb" } > =A0panel { id=3D"cc" } > =A0panel { id=3D"dd"} > =A0} > } > > A panel should never be removed from layout management, it then > becomes pointless. Hi, Sometimes it's useful to have absolute address, for example to adjust the window according to the background image, it's quite tricky to do this with dynamic positioning. If you want everything to be controlled by the layout manger, just don't use the property and wrap panels around widgets. >From your previous description, I think your meaning of margin is some kind of space left around the border of panel, I think that could be useful as well, but perhaps with a different name, I'm considering the following properties: inner_left, inner_right, inner_top, inner_bottom: space reserved inside the border outer_left, outer_right, outer_top, outer_bottom: space reserved outside the border Perhaps the naming of margin_* property is a little misleading, perhaps I can rename them distance_* to remind it they're used as fixed distance to borders of parent. > > 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. In the currently implementation, valign is for the parent widget panel{ direction =3D left_to_right valign =3D center panel{ id =3D"bb"} panel{ id =3D"bb"} panel{ id =3D"bb"} } } Align all child vertically, but I guess this can be implemented per child. --=20 Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/