]> git.proxmox.com Git - grub2.git/commitdiff
* grub-core/gfxmenu.c (list_get_minimal_size): Corrected minimal
authorVladimir Testov <vladimir.testov@rosalab.ru>
Tue, 8 Oct 2013 11:35:00 +0000 (15:35 +0400)
committerVladimir Testov <vladimir.testov@rosalab.ru>
Tue, 8 Oct 2013 11:35:00 +0000 (15:35 +0400)
       width calculations.

ChangeLog
grub-core/gfxmenu/gui_list.c

index bd7f61f711beb4a0abe646009ff2ee49df5caa82..5f1be71d2ca92ef3c27837935fbbbc69b67c7150 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2013-10-08  Vladimir Testov  <vladimir.testov@rosalab.ru>
+
+       * grub-core/gfxmenu.c (list_get_minimal_size): Corrected minimal
+       width calculations.
+
 2013-10-07  Vladimir Serbinenko  <phcoder@gmail.com>
 
        * docs/grub.texi: Update note on colors on emu console.
index fe9c1a569334f8ecdbde64816aabb26312a7e610..c04612c89e23b97a2764318ad82f87f5f6db871e 100644 (file)
@@ -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.  */