]> git.ipfire.org Git - thirdparty/grub.git/commitdiff
* gfxmenu/gui_list.c (draw_menu): Don't add scrollbar width to padding.
authorVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 23 May 2010 11:59:50 +0000 (13:59 +0200)
committerVladimir 'phcoder' Serbinenko <phcoder@gmail.com>
Sun, 23 May 2010 11:59:50 +0000 (13:59 +0200)
Removed drawing_scrollbar argument. All users updated
Fixes #29792.
Reported by Jo Shields

ChangeLog
gfxmenu/gui_list.c

index dbf6f23eb535d533bf921015a05b1d5459f50ff1..65bd6ad0391cd2e3c05c7c54e191706488bce173 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -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
index 0d771413f9fbb32490549e942d43c0a482f0283a..8583a214e2d2b39df2c2a5c2492af22549e88cd5 100644 (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)