diff --git a/ChangeLog b/ChangeLog index 95203326b..52d856671 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2013-10-17 Vladimir Testov + + * grub-core/gfxmenu/gui_progress_bar.c (draw_pixmap_bar): Fixed bug. + Pixmap highlighted section with east and west slices was displayed + incorrectly due to negative width of the central slice. + 2013-10-17 Vladimir Testov * docs/grub.texi: Graphical options information update. diff --git a/grub-core/gfxmenu/gui_progress_bar.c b/grub-core/gfxmenu/gui_progress_bar.c index 4294b7beb..946ec3683 100644 --- a/grub-core/gfxmenu/gui_progress_bar.c +++ b/grub-core/gfxmenu/gui_progress_bar.c @@ -154,14 +154,16 @@ draw_pixmap_bar (grub_gui_progress_bar_t self) int barwidth; bar->set_content_size (bar, tracklen, trackheight); + bar->draw (bar, 0, 0); barwidth = (tracklen * (self->value - self->start) / (self->end - self->start)); - hl->set_content_size (hl, barwidth - hl_h_pad, h - bar_v_pad - hl_v_pad); - - bar->draw (bar, 0, 0); - hl->draw (hl, bar_l_pad, bar_t_pad); + if (barwidth >= hl_h_pad) + { + hl->set_content_size (hl, barwidth - hl_h_pad, h - bar_v_pad - hl_v_pad); + hl->draw (hl, bar_l_pad, bar_t_pad); + } } static void