All of lore.kernel.org
 help / color / mirror / Atom feed
From: Konstantin Vlasov <kvlasov@odin.com>
To: <grub-devel@gnu.org>
Subject: Patch for terminal definition in gfx themes
Date: Fri, 13 Nov 2015 19:31:32 +0300	[thread overview]
Message-ID: <324294321.20151113193132@odin.com> (raw)

[-- Attachment #1: Type: text/plain, Size: 344 bytes --]

Hi,

I discovered that terminal size and position in GFX themes are calculated 
incorrectly: proportional units for terminal-top and terminal-height values are 
calculated from the screen width, not height as one would expect.

I attached the patch for fixing it.


-- 
Best regards,
 Konstantin                          mailto:kvlasov@odin.com

[-- Attachment #2: grub-gfx-terminal-sizes-fix.patch --]
[-- Type: application/octet-stream, Size: 1251 bytes --]

diff --git a/grub-core/gfxmenu/theme_loader.c b/grub-core/gfxmenu/theme_loader.c
index 1a6ed1d..0297839 100644
--- a/grub-core/gfxmenu/theme_loader.c
+++ b/grub-core/gfxmenu/theme_loader.c
@@ -254,9 +254,9 @@ theme_set_string (grub_gfxmenu_view_t view,
   else if (! grub_strcmp ("terminal-top", name))
     {
       unsigned int tmp;
       int err = theme_get_unsigned_int_from_proportional (value,
-                                                          view->screen.width,
+                                                          view->screen.height,
                                                           &tmp);
       if (err != GRUB_ERR_NONE)
         return err;
       view->terminal_rect.y = tmp;
@@ -274,9 +274,9 @@ theme_set_string (grub_gfxmenu_view_t view,
   else if (! grub_strcmp ("terminal-height", name))
     {
       unsigned int tmp;
       int err = theme_get_unsigned_int_from_proportional (value,
-                                                          view->screen.width,
+                                                          view->screen.height,
                                                           &tmp);
       if (err != GRUB_ERR_NONE)
         return err;
       view->terminal_rect.height = tmp;

             reply	other threads:[~2015-11-13 16:54 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-13 16:31 Konstantin Vlasov [this message]
2015-11-13 19:03 ` Patch for terminal definition in gfx themes Andrei Borzenkov

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=324294321.20151113193132@odin.com \
    --to=kvlasov@odin.com \
    --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.