[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: |
Fri, 25 Sep 2009 23:45:05 +0800 |
Hi,
Update:
Some adjustment to data representation. For example:
background = "/splash.png"
means loads splash.png, no extra handling if loading fails (text mode
or file not found)
background = "/splash.png,,blue"
means loads splash.png, if it fails, replace it with rect that has
blue background
Add new number format to specify size for both graphic and text mode:
space = 10/0
10 pixel in graphic text, 0 in text mode
New layout manger, it support the following parameters:
columns
valign
halign
width
height
vspace
hspace
vmargin
hmargin
width/height is the size of widget, if it's not set, the size is
calculated automatically using the size of child widgets
vmargin, hmargin is the distance between horizontal and vertical
border, positive value is from left/top, while negative value is from
right/bottom, for example:
panel
{
vmargin = -0
hmargin = -0
}
places the panel in the bottom right corner.
Here is a sample config file that shows different valign/halign
combination, the image file is inside the previous menu.zip.
screen
{
halign = "center"
valign = "center"
columns = 3
background = "/menu/back.png"
panel
{
background = ",blue"
hspace = 10/0
vspace = 5/0
halign = left
valign = top
width = 28%
height = 28%
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
panel
{
background = ",blue"
hspace = 10/0
vspace = 5/0
halign = center
valign = top
width = 28%
height = 28%
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
panel
{
background = ",blue"
hspace = 10/0
vspace = 5/0
halign = right
valign = top
width = 28%
height = 28%
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
panel
{
background = ",blue"
hspace = 10/0
vspace = 5/0
halign = left
valign = center
width = 28%
height = 28%
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
panel
{
background = ",blue"
hspace = 10/0
vspace = 5/0
halign = center
valign = center
width = 28%
height = 28%
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
panel
{
background = ",blue"
hspace = 10/0
vspace = 5/0
halign = right
valign = center
width = 28%
height = 28%
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
panel
{
background = ",blue"
hspace = 10/0
vspace = 5/0
halign = left
valign = bottom
width = 28%
height = 28%
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
panel
{
background = ",blue"
hspace = 10/0
vspace = 5/0
halign = center
valign = bottom
width = 28%
height = 28%
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
panel
{
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 = ",blue"
hspace = 10/0
vspace = 5/0
halign = right
valign = bottom
hmargin = -0
vmargin = -0
label
{
color = "light-red/cyan"
text = "AA"
space = 1
}
label
{
color = "yellow/cyan"
text = "BBBBBB"
space = 1
}
label
{
color = "light-magenta/cyan"
text = "CCCC"
space = 1
}
}
}
--
Bean
gitgrub home: http://github.com/grub/grub/
my fork page: http://github.com/bean123/grub/
- Re: [GITGRUB] New menu interface (implementation), (continued)
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/24
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/24
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/25
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/25
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/25
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/25
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/25
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/25
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/25
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/25
- Re: [GITGRUB] New menu interface (implementation),
Bean <=
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/27
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/27
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/27
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/27
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/28
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/28
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/28
- Re: [GITGRUB] New menu interface (implementation), Bean, 2009/09/30
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/30
- Re: [GITGRUB] New menu interface (implementation), Michal Suchanek, 2009/09/27