[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: Thu, 24 Sep 2009 09:20:47 +0200


Thanks for this menu preview looks very good.

I guess it could use more padding but if that can be added in the
style there is no problem with that.

There is also an odd column with blue background in text mode. Is that
replacement for the icons? I guess they should not be displayed if it
is not possible to render them.

There is also a background glitch in graphics mode. In text mode the
background of the menu items is cyan but it is blue in graphics.

2009/9/23 Bean <address@hidden>:
> Hi,
> Update:
> Add label widget
> Simple layout manager for panel widget.
> The resource file for new demo is uploaded at:
> Here is the theme file for new demo:
> screen
> {

This is an odd element. Can't this be another panel or just background
form the toplevel panel?

It may be easier this way initially but getting the layout of the
inner pane right without a special element means that the layout is
actually usable at all levels.

Also requiring a screen element makes it harder to just take a menu
and pack it inside another menu.

>  panel
>  {
>    x = "5"
>    y = "5"

What is x and y? Isn't there a more descriptive name for this property?

Why does a panel even need x and y?

Typically it needs something like margin or border or padding to get
some offset between the inner elements and the outside.

This also reminds me that there is nice way of handling pixels in text
mode - just ignore them. That places the menu inside something like

would also look reasonably in text where the image is not displayed.

>    top_left = "/menu/menu_tl.png,,black/cyan/#0x250F"
>    top = "/menu/menu_t.png,tiling,black/cyan/#0x2501"
>    top_right = "/menu/menu_tr.png,,black/cyan/#0x2513"
>    left = "/menu/menu_l.png,tiling,black/cyan/#0x2503"
>    right = "/menu/menu_r.png,tiling,black/cyan/#0x2503"
>    bottom_left = "/menu/menu_bl.png,,black/cyan/#0x2517"
>    bottom = "/menu/menu_b.png,tiling,black/cyan/#0x2501"
>    bottom_right = "/menu/menu_br.png,tiling,black/cyan/#0x251B"
>    background = "/menu/back.png,,#808080/cyan"
>    label
>    {
>      color = "black/cyan"
>      image = "/menu/debian.png,,blue"
>      title = "Hello Debian"
>      spacing = 1
>    }
>    label
>    {
>      color = "yellow/cyan"
>      image = "/menu/ubuntu.png,,blue"
>      title = "Hello Ubuntui (long)"
>      spacing = 1
>    }
>    label
>    {
>      color = "blue/cyan"
>      image = "/menu/gentoo.png,,blue"
>      title = "Hello Gentoo"
>      spacing = 1
>    }
>  }
> }
> The x/y/width/height property is not set in label widget, they'll be
> calculated automatically by panel. The width/height property of panel
> is also skipped, which means using the minimum width/height that
> contains child widgets.
> The full properties of these widgets are:
> screen:
> background - background image
> panel:
> background - background image
> top_left. top, top_right, left, right, bottom_left, bottom,
> bottom_right - image for borders

Are these meant to be borders only?

I guess people who use something like

won't want the whole menu offset by the size of the image.

Is it possible to set a border without supplying these images?

> label
> font - font name
> color - font color
> image - icon image
> title - title text
> spacing - space between image and title

I guess it would be better to change the naming a bit.
I would use 'text' rather than 'title'. The label can be used even for
plain text, not only huge captions (and there is no choice actually
because we have only a single plain font).

'spacing' should not be used alone. There is font spacing, line
spacing, the padding between contained elements, the padding the
padding between the contained elements and the border....
Each should be possible to set by a property so there is clearly more
than one spacing.



reply via email to

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