grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

GFXMENU: Image scaling


From: Towheed Mohammed
Subject: GFXMENU: Image scaling
Date: Tue, 21 Feb 2012 19:07:42 -0800 (PST)

Scaling down an image does not work as intended.  The image only scales down 
when it's corners touches the respective corner of the screen.

Using a 320x320 image and setting the image component's properties thus:
        + image {
            top = 100%-20
            left = 100%-20
            width = 20
            height = 20
            theme_dir = "/usr/share/grub/themes/demo/images/"
            file = "gnu320.png"
        }

scales the image to 20x20 as expected.  See screenshot: bug-image-scaling-1.png

However, using the same image, and setting the image component's properties 
thus:
        + image {
            top = 80%
            left = 80%
            width = 20
            height = 20
            theme_dir = "/usr/share/grub/themes/demo/images/"
            file = "gnu320.png"
        }
 
does not scale the image to 20x20.  See screenshot: bug-image-scaling-2.png.  
The image is actually scaled to fit the area between 80% and 100% of the 
screen's dimension.

This shows that the image is not scaled if it's edges does not touch the 
respective screen boundaries:
        + image {
            top = 0
            left = 368
            width = 20
            height = 20
            theme_dir = "/usr/share/grub/themes/demo/images/"
            file = "gnu320.png"
        }


See screenshot: bug-image-scaling-3.png

If the same image is used as an icon for the menu items, it scales properly.  
See screenshot: icon-scaling-1.png

Attachment: bug-image-scaling-1.png
Description: PNG image

Attachment: bug-image-scaling-3.png
Description: PNG image

Attachment: bug-image-scaling-2.png
Description: PNG image

Attachment: icon-scaling-1.png
Description: PNG image


reply via email to

[Prev in Thread] Current Thread [Next in Thread]