* grub-core/gfxmenu/widget-box.c (get_left_pad): Take corners into
account. (get_top_pad): Likewise. (get_right_pad): Likewise. (get_bottom_pad): Likewise.
This commit is contained in:
parent
9f59e9fc36
commit
ca1b552c02
2 changed files with 53 additions and 5 deletions
|
@ -188,25 +188,65 @@ get_border_width (grub_gfxmenu_box_t self)
|
|||
static int
|
||||
get_left_pad (grub_gfxmenu_box_t self)
|
||||
{
|
||||
return get_width (self->raw_pixmaps[BOX_PIXMAP_W]);
|
||||
int v, c;
|
||||
|
||||
v = get_width (self->raw_pixmaps[BOX_PIXMAP_W]);
|
||||
c = get_width (self->raw_pixmaps[BOX_PIXMAP_NW]);
|
||||
if (c > v)
|
||||
v = c;
|
||||
c = get_width (self->raw_pixmaps[BOX_PIXMAP_SW]);
|
||||
if (c > v)
|
||||
v = c;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
static int
|
||||
get_top_pad (grub_gfxmenu_box_t self)
|
||||
{
|
||||
return get_height (self->raw_pixmaps[BOX_PIXMAP_N]);
|
||||
int v, c;
|
||||
|
||||
v = get_height (self->raw_pixmaps[BOX_PIXMAP_N]);
|
||||
c = get_height (self->raw_pixmaps[BOX_PIXMAP_NW]);
|
||||
if (c > v)
|
||||
v = c;
|
||||
c = get_height (self->raw_pixmaps[BOX_PIXMAP_NE]);
|
||||
if (c > v)
|
||||
v = c;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
static int
|
||||
get_right_pad (grub_gfxmenu_box_t self)
|
||||
{
|
||||
return get_width (self->raw_pixmaps[BOX_PIXMAP_E]);
|
||||
int v, c;
|
||||
|
||||
v = get_width (self->raw_pixmaps[BOX_PIXMAP_E]);
|
||||
c = get_width (self->raw_pixmaps[BOX_PIXMAP_NE]);
|
||||
if (c > v)
|
||||
v = c;
|
||||
c = get_width (self->raw_pixmaps[BOX_PIXMAP_SE]);
|
||||
if (c > v)
|
||||
v = c;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
static int
|
||||
get_bottom_pad (grub_gfxmenu_box_t self)
|
||||
{
|
||||
return get_height (self->raw_pixmaps[BOX_PIXMAP_S]);
|
||||
int v, c;
|
||||
|
||||
v = get_height (self->raw_pixmaps[BOX_PIXMAP_S]);
|
||||
c = get_height (self->raw_pixmaps[BOX_PIXMAP_SW]);
|
||||
if (c > v)
|
||||
v = c;
|
||||
c = get_height (self->raw_pixmaps[BOX_PIXMAP_SE]);
|
||||
if (c > v)
|
||||
v = c;
|
||||
|
||||
return v;
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue