* gfxmenu/gui_list.c (draw_menu): Don't add scrollbar width to padding.

Removed drawing_scrollbar argument. All users updated
	Fixes #29792.
	Reported by Jo Shields
This commit is contained in:
Vladimir 'phcoder' Serbinenko 2010-05-23 13:59:50 +02:00
parent 3ecb080a33
commit ad603f61a5
2 changed files with 11 additions and 11 deletions

View file

@ -1,3 +1,10 @@
2010-05-23 Vladimir Serbinenko <phcoder@gmail.com>
* gfxmenu/gui_list.c (draw_menu): Don't add scrollbar width to padding.
Removed drawing_scrollbar argument. All users updated
Fixes #29792.
Reported by Jo Shields
2010-05-23 Vladimir Serbinenko <phcoder@gmail.com>
* gfxmenu/view.c (grub_gfxmenu_draw_terminal_box): Apply only to current

View file

@ -210,8 +210,7 @@ draw_scrollbar (list_impl_t self,
/* Draw the list of items. */
static void
draw_menu (list_impl_t self, int width, int drawing_scrollbar,
int num_shown_items)
draw_menu (list_impl_t self, int width, int num_shown_items)
{
if (! self->menu_box || ! self->selected_item_box)
return;
@ -226,8 +225,6 @@ draw_menu (list_impl_t self, int width, int drawing_scrollbar,
make_selected_item_visible (self);
int scrollbar_h_space = drawing_scrollbar ? self->scrollbar_width : 0;
grub_gfxmenu_box_t selbox = self->selected_item_box;
int sel_leftpad = selbox->get_left_pad (selbox);
int item_top = boxpad;
@ -244,12 +241,8 @@ draw_menu (list_impl_t self, int width, int drawing_scrollbar,
if (is_selected)
{
int sel_toppad = selbox->get_top_pad (selbox);
selbox->set_content_size (selbox,
(width - 2 * boxpad
- scrollbar_h_space),
item_height);
selbox->draw (selbox,
item_left - sel_leftpad,
selbox->set_content_size (selbox, (width - 2 * boxpad), item_height);
selbox->draw (selbox, item_left - sel_leftpad,
item_top - sel_toppad);
}
@ -320,7 +313,7 @@ list_paint (void *vself, const grub_video_rect_t *region)
box->draw (box, 0, 0);
grub_gui_set_viewport (&content_rect, &vpsave2);
draw_menu (self, content_rect.width, drawing_scrollbar, num_shown_items);
draw_menu (self, content_rect.width, num_shown_items);
grub_gui_restore_viewport (&vpsave2);
if (drawing_scrollbar)