Out developers continue upgrading the GRUB2 bootloader.

There were 14 patches made and token into the upstream.


Upgraded bilinear scaling

Bilinear scaling algorithm was updated to make calculations with more precision. It helps to avoid some artifacts.

Grub2-bilinear-before.png Grub2-bilinear-after.png

New functionality: proportional scaling of the background image

Proportional scaling makes it possible to use the background image for displays with different aspect ratio without the distortion of proportions.

2013 10 21-grub2-example2-en.png

2013 10 21-grub2-example1-en.png

New option scrollbar-slice

Graphical decoration is realized with "boxes", consisting of 9 slices. Corner slices are not scaled.

"North" (upper one) and "south" (bottom one) are scaled horizontally.

"West" (left one) and "east" (right one) are scaled vertically. Center slice is scaled horizontally and vertically.

There can be a graphical decoration of the boot menu. ("menu_pixmap_style"). You can select the slice where the scrollbar will be drawn.

"east" - the same behavior as before, the scrollbar is being drawn in the east slice of the boot menu decoration.

"west" - the scrollbar is being drawn to the left of the boot menu, in the west slice of the boot menu decoration.

The most interesting option is "center". The scrollbar is being drawn in the center slice. Graphical decoration of the boot menu is not necessary. If the scrollbar isn't needed (there are few boot entries) boot entries will be scaled to fit the width of the center slice of the boot menu. (or all the space if there is no menu decoration) If the scrollbar is needed then the width of the boot entries will be decreased. That way we will get common behavior of the boot menu window. Also it simplifies the creation of a new theme for GRUB2.

New options for scrollbar padding

We can set the scrollbar paddings in pixels.

New option "scrollbar_overlay"

The scrollbar consists from two graphical decorations: the frame and the thumb. If this option is set to "true", then the central slice of the thumb will be combined with the central slice of the frame and all side slices of the thumb will overlay side slices of the frame. That way we can create more complex scrollbar with the thumb moving from the edge to the edge.

2013 10 21-grub2-scrollbar without overlay.png 2013 10 21-grub2-scrollbar with overlay.png

New option "progress_highlight_overlay"

Similar to "scrollbar_overlay" but for the progress bar.

2013 10 21-grub2-highlight without overlay-en.png

2013 10 21-grub2-highlight with overlay-en.png

Minimal boot menu width calculation fixed

If the width is set to be less then minimal value then the boot menu will be automatically widened. The formula for width calculating was updated.

Scrollbar drawing fixed (1st patch)

Progress bar was incorrectly drawn before in case of using all 9 slices of the scrollbar thumb.

Scrollbar drawing fixed (2nd patch)

If calculated height of the thumb is too low then we need another algorithm to avoid the error.

Progress bar displaying fixed

There were troubles with drawing of the progress bar if the highlight had west / east slices.

Memory leak fixed

Memory leak was found and fixed.

Sanity checks of the scrollbar parameters were realized

It supports correct behavior in cases of incorrect parameters.

Sanity checks of the progress bar parameters were realized

It supports correct behavior in cases of incorrect parameters.

Official documentation update

GRUB2 theme syntax documentation was brought to actual state.