From: Vladimir Testov <vladimir.testov@rosalab.ru>
To: grub-devel@gnu.org
Subject: Re: [4/4] [PATCH] incorrect calculation of radius in circular_progress.
Date: Wed, 20 Mar 2013 11:43:38 +0400 [thread overview]
Message-ID: <3865659.VmfRCEbUhv@icedphoenix> (raw)
[-- Attachment #1: Type: text/plain, Size: 199 bytes --]
fixed.
variables changed to outer_diameter and inner_diameter
It is more human-readable also
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
[-- Attachment #2: grub-2.00-radius-correction.patch --]
[-- Type: text/x-patch, Size: 817 bytes --]
diff -Naur grub-2.00/grub-core/gfxmenu/gui_circular_progress.c grub-new2/grub-core/gfxmenu/gui_circular_progress.c
--- grub-2.00/grub-core/gfxmenu/gui_circular_progress.c 2010-12-01 17:45:43.000000000 +0300
+++ grub-new2/grub-core/gfxmenu/gui_circular_progress.c 2013-03-20 09:03:03.293238118 +0400
@@ -138,7 +138,15 @@
(height - center_height) / 2, 0, 0,
center_width, center_height);
- int radius = width / 2 - tick_width / 2 - 1;
+ int outer_diameter = width;
+ if (height < outer_diameter) {
+ outer_diameter = height;
+ }
+ int inner_diameter = tick_width;
+ if (tick_height > inner_diameter) {
+ inner_diameter = tick_height;
+ }
+ int radius = outer_diameter / 2 - inner_diameter / 2 - 1;
int nticks;
int tick_begin;
int tick_end;
next reply other threads:[~2013-03-20 7:43 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-03-20 7:43 Vladimir Testov [this message]
-- strict thread matches above, loose matches on Subject: below --
2013-03-13 10:53 [4/4] [PATCH] incorrect calculation of radius in circular_progress Vladimir Testov
2013-03-19 6:55 ` Vladimir 'φ-coder/phcoder' Serbinenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=3865659.VmfRCEbUhv@icedphoenix \
--to=vladimir.testov@rosalab.ru \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.