set terminal window in theme file
PATCH 2/2 set terminal window in theme file
There can be cases when we would like to move terminal window. For example, it follows our theme design.
So,
options:
terminal-top
terminal-left
terminal-width
terminal-height
terminal-border
(the last is for setting terminal-border width)
All of these were hard-coded.
Tested on all cases. Safe. (if some part of the terminal window is going to fall of the screen rectangle, parameters will be correspondingly auto- adjusted)
Signature · 4 lines
With best regards, _______________________________ Vladimir Testov, ROSA Laboratory. www.rosalab.ru
docs/grub.texi +5 -0
@@ -1901,6 +1901,11 @@ @item desktop-image @tab Specifies the image to use as the background. It will be scaled to fit the screen size. @item desktop-color @tab Specifies the color for the background if *desktop-image* is not specified. @item terminal-box @tab Specifies the file name pattern for the styled box slices used for the command line terminal window. For example, ``terminal-box: terminal_*.png'' will use the images ``terminal_c.png`` as the center area, ``terminal_n.png`` as the north (top) edge, ``terminal_nw.png`` as the northwest (upper left) corner, and so on. If the image for any slice is not found, it will simply be left empty. +@item terminal-border @tab Specifies the terminal border's width. +@item terminal-left @tab Specifies the terminal left coordinate. +@item terminal-top @tab Specifies the termianl top coordinate. +@item terminal-width @tab Specifies the terminal width. +@item terminal-height @tab Specifies the terminal height. @end multitable
grub-core/gfxmenu/theme_loader.c +53 -0
65 lines not on this page · raw message
grub-core/gfxmenu/view.c +90 -32
171 lines not on this page · raw message
include/grub/gfxmenu_view.h +11 -0
@@ -89,7 +89,18 @@struct grub_gfxmenu_view {grub_video_rect_t screen; +grub_video_rect_t terminal_rect; +signed x; +grub_fixed_signed_t xfrac; +signed y; +grub_fixed_signed_t yfrac; +signed w; +grub_fixed_signed_t wfrac; +signed h; +grub_fixed_signed_t hfrac; + +int terminal_border;grub_font_t title_font;char *terminal_font_name;grub_video_rgba_color_t title_color;
Patch has been remade to meet the requirements.
Quoted 25 lines · Vladimir Testov
There can be cases when we would like to move terminal window. For example, it follows our theme design.
So,
options:
terminal-top
terminal-left
terminal-width
terminal-height
terminal-border(the last is for setting terminal-border width)
All of these were hard-coded.
Tested on all cases. Safe. (if some part of the terminal window is going to fall of the screen rectangle, parameters will be correspondingly auto- adjusted)
--
With best regards,
_______________________________
Vladimir Testov, ROSA Laboratory.
www.rosalab.ru
Signature · 4 lines
With best regards, _______________________________ Vladimir Testov, ROSA Laboratory. www.rosalab.ru
docs/grub.texi +5 -0
@@ -1904,6 +1904,11 @@ @item desktop-image @tab Specifies the image to use as the background. It will be scaled to fit the screen size. @item desktop-color @tab Specifies the color for the background if *desktop-image* is not specified. @item terminal-box @tab Specifies the file name pattern for the styled box slices used for the command line terminal window. For example, ``terminal-box: terminal_*.png'' will use the images ``terminal_c.png`` as the center area, ``terminal_n.png`` as the north (top) edge, ``terminal_nw.png`` as the northwest (upper left) corner, and so on. If the image for any slice is not found, it will simply be left empty. +@item terminal-border @tab Specifies the border width of the terminal window. +@item terminal-left @tab Specifies the left coordinate of the terminal window. +@item terminal-top @tab Specifies the top coordinate of the terminal window. +@item terminal-width @tab Specifies the width of the terminal window. +@item terminal-height @tab Specifies the height of the terminal window. @end multitable
grub-core/gfxmenu/theme_loader.c +53 -0
65 lines not on this page · raw message
grub-core/gfxmenu/view.c +100 -37
181 lines not on this page · raw message
include/grub/gfxmenu_view.h +11 -0
@@ -83,7 +83,18 @@struct grub_gfxmenu_view {grub_video_rect_t screen; +grub_video_rect_t terminal_rect; +signed x; +grub_fixed_signed_t xfrac; +signed y; +grub_fixed_signed_t yfrac; +signed w; +grub_fixed_signed_t wfrac; +signed h; +grub_fixed_signed_t hfrac; + +int terminal_border;grub_font_t title_font;grub_font_t message_font;char *terminal_font_name;