Skip to contentSkip to conversation

Patch for terminal definition in gfx themes

PATCH Konstantin Vlasov 2 participants 2 messages Nov 13, 2015

lore
Share & tools
lore
#0 lore raw

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.

Signature · 2 lines
Best regards,
 Konstantin                          mailto:[email protected]
grub-core/gfxmenu/theme_loader.c +2 -2
index 1a6ed1d..0297839 100644
@@ -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;
#1 lore raw

13.11.2015 19:31, Konstantin Vlasov пишет:

Quoted 9 lines

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.