* 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:
parent
3ecb080a33
commit
ad603f61a5
2 changed files with 11 additions and 11 deletions
|
@ -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>
|
2010-05-23 Vladimir Serbinenko <phcoder@gmail.com>
|
||||||
|
|
||||||
* gfxmenu/view.c (grub_gfxmenu_draw_terminal_box): Apply only to current
|
* gfxmenu/view.c (grub_gfxmenu_draw_terminal_box): Apply only to current
|
||||||
|
|
|
@ -210,8 +210,7 @@ draw_scrollbar (list_impl_t self,
|
||||||
|
|
||||||
/* Draw the list of items. */
|
/* Draw the list of items. */
|
||||||
static void
|
static void
|
||||||
draw_menu (list_impl_t self, int width, int drawing_scrollbar,
|
draw_menu (list_impl_t self, int width, int num_shown_items)
|
||||||
int num_shown_items)
|
|
||||||
{
|
{
|
||||||
if (! self->menu_box || ! self->selected_item_box)
|
if (! self->menu_box || ! self->selected_item_box)
|
||||||
return;
|
return;
|
||||||
|
@ -226,8 +225,6 @@ draw_menu (list_impl_t self, int width, int drawing_scrollbar,
|
||||||
|
|
||||||
make_selected_item_visible (self);
|
make_selected_item_visible (self);
|
||||||
|
|
||||||
int scrollbar_h_space = drawing_scrollbar ? self->scrollbar_width : 0;
|
|
||||||
|
|
||||||
grub_gfxmenu_box_t selbox = self->selected_item_box;
|
grub_gfxmenu_box_t selbox = self->selected_item_box;
|
||||||
int sel_leftpad = selbox->get_left_pad (selbox);
|
int sel_leftpad = selbox->get_left_pad (selbox);
|
||||||
int item_top = boxpad;
|
int item_top = boxpad;
|
||||||
|
@ -244,12 +241,8 @@ draw_menu (list_impl_t self, int width, int drawing_scrollbar,
|
||||||
if (is_selected)
|
if (is_selected)
|
||||||
{
|
{
|
||||||
int sel_toppad = selbox->get_top_pad (selbox);
|
int sel_toppad = selbox->get_top_pad (selbox);
|
||||||
selbox->set_content_size (selbox,
|
selbox->set_content_size (selbox, (width - 2 * boxpad), item_height);
|
||||||
(width - 2 * boxpad
|
selbox->draw (selbox, item_left - sel_leftpad,
|
||||||
- scrollbar_h_space),
|
|
||||||
item_height);
|
|
||||||
selbox->draw (selbox,
|
|
||||||
item_left - sel_leftpad,
|
|
||||||
item_top - sel_toppad);
|
item_top - sel_toppad);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -320,7 +313,7 @@ list_paint (void *vself, const grub_video_rect_t *region)
|
||||||
box->draw (box, 0, 0);
|
box->draw (box, 0, 0);
|
||||||
|
|
||||||
grub_gui_set_viewport (&content_rect, &vpsave2);
|
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);
|
grub_gui_restore_viewport (&vpsave2);
|
||||||
|
|
||||||
if (drawing_scrollbar)
|
if (drawing_scrollbar)
|
||||||
|
|
Loading…
Reference in a new issue