All of lore.kernel.org
 help / color / mirror / Atom feed
* Patch for terminal definition in gfx themes
@ 2015-11-13 16:31 Konstantin Vlasov
  2015-11-13 19:03 ` Andrei Borzenkov
  0 siblings, 1 reply; 2+ messages in thread
From: Konstantin Vlasov @ 2015-11-13 16:31 UTC (permalink / raw)
  To: grub-devel

[-- 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;

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: Patch for terminal definition in gfx themes
  2015-11-13 16:31 Patch for terminal definition in gfx themes Konstantin Vlasov
@ 2015-11-13 19:03 ` Andrei Borzenkov
  0 siblings, 0 replies; 2+ messages in thread
From: Andrei Borzenkov @ 2015-11-13 19:03 UTC (permalink / raw)
  To: The development of GNU GRUB

13.11.2015 19:31, Konstantin Vlasov пишет:
> 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.
>
>

Committed, thanks!

Please use "git format-patch" next time.


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-13 19:03 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-11-13 16:31 Patch for terminal definition in gfx themes Konstantin Vlasov
2015-11-13 19:03 ` Andrei Borzenkov

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.