+2013-07-25 Vladimir Testov <vladimir.testov@rosalab.ru>
+
+ * grub-core/gfxmenu/widget-box.c: Fixed draw function. Now it takes
+ maximum of NW, N, NE heights instead of N's height and maximum of
+ NW, W, SW widths instead of W's width. (So the box will be always
+ correctly drawn)
+
2013-07-20 Grégoire Sutre <gregoire.sutre@gmail.com>
* grub-core/partmap/bsdlabel.c (netopenbsdlabel_partition_map_iterate):
{
int height_n;
int width_w;
-
- height_n = get_height (self->scaled_pixmaps[BOX_PIXMAP_N]);
- width_w = get_width (self->scaled_pixmaps[BOX_PIXMAP_W]);
+ int tmp;
+
+ /* Count maximum height of NW, N, NE. */
+ height_n = get_height (self->scaled_pixmaps[BOX_PIXMAP_NW]);
+ tmp = get_height (self->scaled_pixmaps[BOX_PIXMAP_N]);
+ if (tmp > height_n)
+ height_n = tmp;
+ tmp = get_height (self->scaled_pixmaps[BOX_PIXMAP_NE]);
+ if (tmp > height_n)
+ height_n = tmp;
+
+ /* Count maximum width of NW, W, SW. */
+ width_w = get_width (self->scaled_pixmaps[BOX_PIXMAP_NW]);
+ tmp = get_width (self->scaled_pixmaps[BOX_PIXMAP_W]);
+ if (tmp > width_w)
+ width_w = tmp;
+ tmp = get_width (self->scaled_pixmaps[BOX_PIXMAP_SW]);
+ if (tmp > width_w)
+ width_w = tmp;
/* Draw sides. */
blit (self, BOX_PIXMAP_N, x + width_w, y);