[Top][All Lists]

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

Re: [GITGRUB] New menu interface (implementation)

From: Michal Suchanek
Subject: Re: [GITGRUB] New menu interface (implementation)
Date: Mon, 28 Sep 2009 13:44:22 +0200

2009/9/28 Bean <address@hidden>:
> 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.

Or implement a viewport for text which can be undoubtedly used outside of menu.
>> 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
> }

OK, and instead of negative width/height and vmargin/hmargin (which
should be actually on both sides anyway) can't we just have margin-to,
margin-bottom, margin-left, margin-right so that the naming and values
make some sense?

> 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.

That's quite odd way of doing this. What we actually have is a rect,
top-left rect, top-rect .. so there's no reason they should be the
same size, and they actually aren't only the corner rects and plain
rect are 1x1, the side rects are 1xN.

Isn't there a more straightforward way of doing this? Perhaps add a
property for borders that can hold a bitmap and a simple style
(single,double), and defaults to single in text if only a bitmap is

>> 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.

Not that much, really. And wrapping a panel around each pair is more
robust, the panel should hold them together even if another element is

> 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.

What icons are you going to use for distinguishing boot items? You can
either put very few icons there so they will very well fit a single
row or single column or you have many icons but then they aren't
distinguishing and you can use them at most as bullets for the kernel

This isn't iPhone so there is no use in making grub look like one. You
can't get 20 distinct things you can do with grub so you can't have 20
(4x5) functional icons. You can add dummy icons in your theme if you

And I'm sure that even on an iPhone if you enter an application that
shows ie your bookmarks or playlist it does not show the entries as
icon view but as plaintext list, otherwise you could not tell what is



reply via email to

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