[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GITGRUB] New menu interface (implementation)

From: Bean
Subject: Re: [GITGRUB] New menu interface (implementation)
Date: Mon, 28 Sep 2009 18:48:06 +0800

On Mon, Sep 28, 2009 at 5:47 PM, Michal Suchanek <address@hidden> 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:

  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:

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.


gitgrub home:
my fork page:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]