https://bugzilla.novell.com/show_bug.cgi?id=779169
https://bugzilla.novell.com/show_bug.cgi?id=779169#c7
Luiz Angelo Daros de Luca changed:
What |Removed |Added
----------------------------------------------------------------------------
Status|NEEDINFO |NEW
InfoProvider|luizluca@tre-sc.gov.br |
--- Comment #7 from Luiz Angelo Daros de Luca 2013-11-07 16:55:42 UTC ---
It's only visible for lowres displays (640x480). In the case, I test with
virtualbox. I don't know why grub chooses to use this lowres as vbox allows
higher resolutions.
I checked every property of /usr/share/grub2/themes/openSUSE/theme.txt and all
of them seems to be respected, except for width in:
+ progress_bar {
id = "__timeout__"
left = 33%
top = 85%
height = 20
width = 40%
Progress bar is, it looks like, intentionally a little bit misaligned (3%) to
the left as the config should generate a scroll like this:
33% 40% 27%
+---------------------------------+
blank | progress bar | blank
+---------------------------------+
However, grub displays it as
33% 77% (or even more)
+------------------------------------------+
blank | progress bar |
+------------------------------------------+
Grub might have some problems to calculate the relative size of 40% in this
scenario or the progress bar is simply hard coded to have a fixed or a minimum
size.
In time: I google for grub2 code and found this:
http://git.savannah.gnu.org/cgit/grub.git/tree/grub-core/gfxmenu/gui_progres...
static void
progress_bar_get_minimal_size (void *vself,
unsigned *width, unsigned *height)
{
unsigned min_width = 0;
unsigned min_height = 0;
grub_gui_progress_bar_t self = vself;
if (self->template)
{
min_width = grub_font_get_string_width (self->font, self->template);
min_width += grub_font_get_string_width (self->font, "XXXXXXXXXX");
min_height = grub_font_get_descent (self->font)
+ grub_font_get_ascent (self->font);
}
if (check_pixmaps (self))
{
grub_gfxmenu_box_t bar = self->bar_box;
grub_gfxmenu_box_t hl = self->highlight_box;
min_width += bar->get_left_pad (bar) + bar->get_right_pad (bar);
min_height += bar->get_top_pad (bar) + bar->get_bottom_pad (bar);
if (!self->highlight_overlay)
{
min_width += hl->get_left_pad (hl) + hl->get_right_pad (hl);
min_height += hl->get_top_pad (hl) + hl->get_bottom_pad (hl);
}
}
else
{
min_height += 2;
min_width += 2;
}
*width = 200;
if (*width < min_width)
*width = min_width;
*height = 28;
if (*height < min_height)
*height = min_height;
}
This might not be the opensuse grub2 version but I also found similar code in a
older version of grub. Grub uses a minimum size of 200px or the size needed to
display the text. As it is very long "The highlighed entry...", it defines the
progressbar size. Also, there is some spacing (pad?) between "The" and the
beginning of the progress bar (about 30px for me), which requires a little bit
more space. So, when the minimum width is greater than 40% of screen width,
this bug is triggered.
I don't know if it is possible but a permanent solution would be to define
somehow the progressbar position to be hoz aligned at the center, no matter
which size the progressbar would take.
Opensuse grub theme even consider lower resolution:
/usr/share/grub2/backgrounds/openSUSE/320x200.png
/usr/share/grub2/backgrounds/openSUSE/320x240.png
BTW, grub2-branding-basedonopensuse still mentions 12.3 while
grub2-branding-openSUSE uses 13.1. Why there is a basedonopensuse and a
openSUSE for everything about branding? Somehow, installing a clean system,
selecting only "base system" pattern, chooses basedonopensuse instead of
openSUSE.
--
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug.