From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MsDmC-0003AH-KW for mharc-grub-devel@gnu.org; Mon, 28 Sep 2009 06:48:16 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MsDmA-00039Z-0E for grub-devel@gnu.org; Mon, 28 Sep 2009 06:48:14 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MsDm4-000399-3d for grub-devel@gnu.org; Mon, 28 Sep 2009 06:48:12 -0400 Received: from [199.232.76.173] (port=54689 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MsDm3-000396-Tc for grub-devel@gnu.org; Mon, 28 Sep 2009 06:48:07 -0400 Received: from mail-pz0-f181.google.com ([209.85.222.181]:64604) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MsDm3-0001qx-CB for grub-devel@gnu.org; Mon, 28 Sep 2009 06:48:07 -0400 Received: by pzk11 with SMTP id 11so2122960pzk.14 for ; Mon, 28 Sep 2009 03:48:06 -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=9nWOWmdoN6qenmcg+TH3KqQpHtR49tE+twc8jC1E/J4=; b=t5xfLsHow2CKICTROiKxq7BD7BFVemKXbIs5ktnQSbHkasqeEIc9I0SpzinC2vux96 c7Eas6liWVA9if1t1zIM6S8I7eHmOGN3nrnBpp51FnD7R8mt7ViuNNcdUlqTTxHVPXEU jABwcYh+d7DCTMXhMGfsSfce8tgssLtwCXxp4= 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=XSkD8UJIzXeaCwKfK5aD5o1MrSdqA2VFpi7Q15QQFBpfokwcUZklbA2Xy5Y2AdMvJP akentNBogj/TYgQGm0UJ4+y4KcVDyC6fzjdCUfLbmkrmE23tT7B0IUdVGYpVlckDqyXX 4aPYI1xD3ZfHm9nuXJ3/vXeqOjSpeeIPMt/UU= MIME-Version: 1.0 Received: by 10.141.28.16 with SMTP id f16mr122706rvj.109.1254134886371; Mon, 28 Sep 2009 03:48:06 -0700 (PDT) In-Reply-To: References: Date: Mon, 28 Sep 2009 18:48:06 +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: Mon, 28 Sep 2009 10:48:14 -0000 On Mon, Sep 28, 2009 at 5:47 PM, Michal Suchanek wrote: >> There are viewport function in region, available in graphic and text >> mode. I can use it to limit the widget. > > No need for another viewport, we have one in video/fb already. But that only works in graphic mode, it we want the ui to be portable between text and graphic mode, we need to use region function. > OK, so please consider a one pixel border around a widget (it would be > nice if this was available without supplying a bitmap but you can > simulate it by creating a 1x1px bitmap in the widget foreground color > and supplying it to all of top_left/top/../bottom properties). > > This layout sucks because there is no space around the border. If you > look at any newspaper, magazine, word processor, whatever has text > with borders you can see that the borders are used to separate > specific piece of text and there is always space on each side of the > border larger than the spacing of the font. The letters aren't glued > to the border because the border is used to separate two pieces of > text, not glue them together. I can add border_width/border_height/border_color property that draw a extra rect around the top/left/bottom/right bitmap. > I want the panel to be in all corners at once, with a uniform space > between the edge of the screen and the panel. I want the same mechanic > to be usable when I want non-uniform space such as when fitting the > panel to a background bitmap. I see, that can be archived, we can use negative value of width/height to indicate subtraction from parent's width/height, perhaps something like this: panel { vmargin = 2 hmargin = 2 width = -4 height = -4 } This leaves a 2 character size at the borders. > How does it determine the size of the rect if the image is not loaded? > Shouldn't it be 0x0? Actually the size of rect is 1c x 1c. This is used for top/left/bottom/right bitmap property. In graphic mode, it loads the bitmap, in text mode, it replace it with a 1 x N rect box with ascii fill character. > Because the generic case creates only poor layouts and adds needless > complexity to the solution. Some uses for columns: Dialog boxes. For example, in password input, we have widget label Name, edit box, label Password, edit box, etc. We can wrap a panel around each pair, but setting columns = 2 is easier. If we use a background image like this: http://www.kde-look.org/content/preview.php?preview=1&id=76173&file1=76173-1.png&file2=76173-2.png&file3=76173-3.png&name=Gentoo+GFXboot+Theme+Set The menu is limited to a small box. If we use icons to represent boot items, then only a few icons can be shown in single row/single column setup. Using columns can maximize space usage, it also has the iphone's look and feel. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/