|
|
a5bd9f6 |
From a2575f0e5de45c022ed54a5b368e82b2a688c73e Mon Sep 17 00:00:00 2001
|
|
|
a5bd9f6 |
From: Vladimir Testov <vladimir.testov@rosalab.ru>
|
|
|
a5bd9f6 |
Date: Wed, 3 Apr 2013 09:20:29 +0200
|
|
|
a5bd9f6 |
Subject: [PATCH 242/364] * grub-core/gfxmenu/gui_circular_progress.c:
|
|
|
a5bd9f6 |
Take both width and height into account when calculating radius.
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
---
|
|
|
a5bd9f6 |
ChangeLog | 6 ++++++
|
|
|
a5bd9f6 |
grub-core/gfxmenu/gui_circular_progress.c | 2 +-
|
|
|
a5bd9f6 |
include/grub/misc.h | 3 +++
|
|
|
a5bd9f6 |
3 files changed, 10 insertions(+), 1 deletion(-)
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
diff --git a/ChangeLog b/ChangeLog
|
|
|
a5bd9f6 |
index 8bdb17a..92e8dad 100644
|
|
|
a5bd9f6 |
--- a/ChangeLog
|
|
|
a5bd9f6 |
+++ b/ChangeLog
|
|
|
a5bd9f6 |
@@ -1,4 +1,10 @@
|
|
|
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 |
+ into account when calculating radius.
|
|
|
a5bd9f6 |
+
|
|
|
a5bd9f6 |
+2013-04-03 Vladimir Testov <vladimir.testov@rosalab.ru>
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
* grub-core/gfxmenu/view.c: Fix off-by-one error.
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
diff --git a/grub-core/gfxmenu/gui_circular_progress.c b/grub-core/gfxmenu/gui_circular_progress.c
|
|
|
a5bd9f6 |
index d07ca6e..e06d40c 100644
|
|
|
a5bd9f6 |
--- a/grub-core/gfxmenu/gui_circular_progress.c
|
|
|
a5bd9f6 |
+++ b/grub-core/gfxmenu/gui_circular_progress.c
|
|
|
a5bd9f6 |
@@ -138,7 +138,7 @@ circprog_paint (void *vself, const grub_video_rect_t *region)
|
|
|
a5bd9f6 |
(height - center_height) / 2, 0, 0,
|
|
|
a5bd9f6 |
center_width, center_height);
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
- int radius = width / 2 - tick_width / 2 - 1;
|
|
|
a5bd9f6 |
+ int radius = grub_min (height, width) / 2 - grub_max (tick_height, tick_width) / 2 - 1;
|
|
|
a5bd9f6 |
int nticks;
|
|
|
a5bd9f6 |
int tick_begin;
|
|
|
a5bd9f6 |
int tick_end;
|
|
|
a5bd9f6 |
diff --git a/include/grub/misc.h b/include/grub/misc.h
|
|
|
a5bd9f6 |
index f0ecaec..c953a00 100644
|
|
|
a5bd9f6 |
--- a/include/grub/misc.h
|
|
|
a5bd9f6 |
+++ b/include/grub/misc.h
|
|
|
a5bd9f6 |
@@ -478,4 +478,7 @@ void EXPORT_FUNC(grub_real_boot_time) (const char *file,
|
|
|
a5bd9f6 |
#define grub_boot_time(fmt, args...)
|
|
|
a5bd9f6 |
#endif
|
|
|
a5bd9f6 |
|
|
|
a5bd9f6 |
+#define grub_max(a, b) (((a) > (b)) ? (a) : (b))
|
|
|
a5bd9f6 |
+#define grub_min(a, b) (((a) < (b)) ? (a) : (b))
|
|
|
a5bd9f6 |
+
|
|
|
a5bd9f6 |
#endif /* ! GRUB_MISC_HEADER */
|
|
|
a5bd9f6 |
--
|
|
|
a5bd9f6 |
1.8.1.4
|
|
|
a5bd9f6 |
|