* 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.
This commit is contained in:
Vladimir Testov 2013-10-17 15:34:04 +04:00
parent ad543f123b
commit 9c13c57623
2 changed files with 12 additions and 4 deletions

View file

@ -1,3 +1,9 @@
2013-10-17 Vladimir Testov <vladimir.testov@rosalab.ru>
* 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 <vladimir.testov@rosalab.ru> 2013-10-17 Vladimir Testov <vladimir.testov@rosalab.ru>
* docs/grub.texi: Graphical options information update. * docs/grub.texi: Graphical options information update.

View file

@ -154,14 +154,16 @@ draw_pixmap_bar (grub_gui_progress_bar_t self)
int barwidth; int barwidth;
bar->set_content_size (bar, tracklen, trackheight); bar->set_content_size (bar, tracklen, trackheight);
bar->draw (bar, 0, 0);
barwidth = (tracklen * (self->value - self->start) barwidth = (tracklen * (self->value - self->start)
/ (self->end - self->start)); / (self->end - self->start));
hl->set_content_size (hl, barwidth - hl_h_pad, h - bar_v_pad - hl_v_pad); if (barwidth >= hl_h_pad)
{
bar->draw (bar, 0, 0); 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); hl->draw (hl, bar_l_pad, bar_t_pad);
}
} }
static void static void