Take into account the decorations the computing menu entry width.

* grub-core/gfxmenu/widget-box.c (get_border_width): New function.
	(grub_gfxmenu_create_box): Register get_border_width.
	* grub-core/gfxmenu/gui_list.c (draw_menu): Use get_border_width
	if available.
	* include/grub/gfxwidgets.h (grub_gfxmenu_box): New member
	get_border_width.
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2011-04-19 00:44:53 +02:00
parent e74b3947af
commit abc474ef4b
4 changed files with 25 additions and 2 deletions

View file

@ -36,6 +36,7 @@ struct grub_gfxmenu_box
void (*draw) (grub_gfxmenu_box_t self, int x, int y);
void (*set_content_size) (grub_gfxmenu_box_t self,
int width, int height);
int (*get_border_width) (grub_gfxmenu_box_t self);
int (*get_left_pad) (grub_gfxmenu_box_t self);
int (*get_top_pad) (grub_gfxmenu_box_t self);
int (*get_right_pad) (grub_gfxmenu_box_t self);