From 7286c38450254632139033cd53c08e3b5d2097b2 Mon Sep 17 00:00:00 2001 From: Vladimir Testov Date: Tue, 8 Oct 2013 15:35:00 +0400 Subject: [PATCH] * grub-core/gfxmenu.c (list_get_minimal_size): Corrected minimal width calculations. --- ChangeLog | 5 +++++ grub-core/gfxmenu/gui_list.c | 5 ++++- 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index bd7f61f71..5f1be71d2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2013-10-08 Vladimir Testov + + * grub-core/gfxmenu.c (list_get_minimal_size): Corrected minimal + width calculations. + 2013-10-07 Vladimir Serbinenko * docs/grub.texi: Update note on colors on emu console. diff --git a/grub-core/gfxmenu/gui_list.c b/grub-core/gfxmenu/gui_list.c index fe9c1a569..c04612c89 100644 --- a/grub-core/gfxmenu/gui_list.c +++ b/grub-core/gfxmenu/gui_list.c @@ -430,7 +430,9 @@ list_get_minimal_size (void *vself, unsigned *width, unsigned *height) grub_gfxmenu_box_t selbox = self->selected_item_box; int sel_top_pad = selbox->get_top_pad (selbox); int sel_bottom_pad = selbox->get_bottom_pad (selbox); - + int sel_left_pad = selbox->get_left_pad (selbox); + int sel_right_pad = selbox->get_right_pad (selbox); + *width = grub_font_get_string_width (self->item_font, "Typical OS"); width_s = grub_font_get_string_width (self->selected_item_font, "Typical OS"); @@ -438,6 +440,7 @@ list_get_minimal_size (void *vself, unsigned *width, unsigned *height) *width = width_s; *width += 2 * boxpad + box_left_pad + box_right_pad + + sel_left_pad + sel_right_pad + 2 + self->item_icon_space + self->icon_width; /* Set the menu box height to fit the items. */