a5bd9f6
From 911b53873d4c24656d2587650103ca3af081fa61 Mon Sep 17 00:00:00 2001
a5bd9f6
From: Vladimir Testov <vladimir.testov@rosalab.ru>
a5bd9f6
Date: Wed, 3 Apr 2013 09:34:08 +0200
a5bd9f6
Subject: [PATCH 243/364] 	* grub-core/gfxmenu/gui_progress_bar.c: Handle
a5bd9f6
 padding sizes.
a5bd9f6
a5bd9f6
---
a5bd9f6
 ChangeLog                            | 4 ++++
a5bd9f6
 grub-core/gfxmenu/gui_progress_bar.c | 8 +++++++-
a5bd9f6
 2 files changed, 11 insertions(+), 1 deletion(-)
a5bd9f6
a5bd9f6
diff --git a/ChangeLog b/ChangeLog
a5bd9f6
index 92e8dad..5e516dc 100644
a5bd9f6
--- a/ChangeLog
a5bd9f6
+++ b/ChangeLog
a5bd9f6
@@ -1,4 +1,8 @@
a5bd9f6
 2013-04-03  Vladimir Testov <vladimir.testov@rosalab.ru>
a5bd9f6
+
a5bd9f6
+	* grub-core/gfxmenu/gui_progress_bar.c: Handle padding sizes.
a5bd9f6
+
a5bd9f6
+2013-04-03  Vladimir Testov <vladimir.testov@rosalab.ru>
a5bd9f6
 2013-04-03  Vladimir Serbinenko  <phcoder@gmail.com>
a5bd9f6
 
a5bd9f6
 	* grub-core/gfxmenu/gui_circular_progress.c: Take both width and height
a5bd9f6
diff --git a/grub-core/gfxmenu/gui_progress_bar.c b/grub-core/gfxmenu/gui_progress_bar.c
a5bd9f6
index 7b005f4..965c6b3 100644
a5bd9f6
--- a/grub-core/gfxmenu/gui_progress_bar.c
a5bd9f6
+++ b/grub-core/gfxmenu/gui_progress_bar.c
a5bd9f6
@@ -139,6 +139,12 @@ draw_pixmap_bar (grub_gui_progress_bar_t self)
a5bd9f6
   int bar_b_pad = bar->get_bottom_pad (bar);
a5bd9f6
   int bar_h_pad = bar_l_pad + bar_r_pad;
a5bd9f6
   int bar_v_pad = bar_t_pad + bar_b_pad;
a5bd9f6
+  int hl_l_pad = hl->get_left_pad (hl);
a5bd9f6
+  int hl_r_pad = hl->get_right_pad (hl);
a5bd9f6
+  int hl_t_pad = hl->get_top_pad (hl);
a5bd9f6
+  int hl_b_pad = hl->get_bottom_pad (hl);
a5bd9f6
+  int hl_h_pad = hl_l_pad + hl_r_pad;
a5bd9f6
+  int hl_v_pad = hl_t_pad + hl_b_pad;
a5bd9f6
   int tracklen = w - bar_h_pad;
a5bd9f6
   int trackheight = h - bar_v_pad;
a5bd9f6
   int barwidth;
a5bd9f6
@@ -148,7 +154,7 @@ draw_pixmap_bar (grub_gui_progress_bar_t self)
a5bd9f6
   barwidth = (tracklen * (self->value - self->start) 
a5bd9f6
 	      / (self->end - self->start));
a5bd9f6
 
a5bd9f6
-  hl->set_content_size (hl, barwidth, h - bar_v_pad);
a5bd9f6
+  hl->set_content_size (hl, barwidth - hl_h_pad, h - bar_v_pad - hl_v_pad);
a5bd9f6
 
a5bd9f6
   bar->draw (bar, 0, 0);
a5bd9f6
   hl->draw (hl, bar_l_pad, bar_t_pad);
a5bd9f6
-- 
a5bd9f6
1.8.1.4
a5bd9f6