* Grub2 theme bug with relative numeric values for boot_menu?
@ 2014-05-26 22:19 John Hupp
2014-06-02 13:59 ` Andrey Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: John Hupp @ 2014-05-26 22:19 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 1044 bytes --]
I'm trying to make my theme completely resolution-independent. You can
see a current screen shot at Post your Grub 2 Themes
<http://ubuntuforums.org/showthread.php?t=1823915&page=14&p=13031738#post13031738>
Grub responded well to % values for the numeric values in the progress
bar and labels. Also OK with %'s for boot_menu properties top, left,
height, width.
But I'm getting bad behavior with item_height and the other properties.
For a 1024x768 grub display and an original setting of item_height = 26,
I can't get equivalent output unless I set item_height = 27%
So item_height seems to be referencing a parent with a height of about
96, rather than 768.
This is in a VMWare Player environment running Lubuntu 14.04.
Is this a known problem, or is there an explanation/workaround?
(I also realized as I got into this that I will run into a problem with
different aspect ratios, so other than creating at least two themes for
the commonest aspect ratios, I'd be interested in a tip there as well if
there is a solution.)
[-- Attachment #2: Type: text/html, Size: 1383 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Grub2 theme bug with relative numeric values for boot_menu?
2014-05-26 22:19 Grub2 theme bug with relative numeric values for boot_menu? John Hupp
@ 2014-06-02 13:59 ` Andrey Borzenkov
2014-06-02 16:06 ` John Hupp
0 siblings, 1 reply; 4+ messages in thread
From: Andrey Borzenkov @ 2014-06-02 13:59 UTC (permalink / raw)
To: The development of GNU GRUB; +Cc: grub-dev
В Mon, 26 May 2014 18:19:23 -0400
John Hupp <grub-dev@prpcompany.com> пишет:
> I'm trying to make my theme completely resolution-independent. You can
> see a current screen shot at Post your Grub 2 Themes
> <http://ubuntuforums.org/showthread.php?t=1823915&page=14&p=13031738#post13031738>
>
Pictures are blocked for guests.
> Grub responded well to % values for the numeric values in the progress
> bar and labels. Also OK with %'s for boot_menu properties top, left,
> height, width.
>
> But I'm getting bad behavior with item_height and the other properties.
> For a 1024x768 grub display and an original setting of item_height = 26,
> I can't get equivalent output unless I set item_height = 27%
>
These properties do not even understand proportional units. If you are
using modified grub which adds support for it, please post patch,
otherwise it is impossible to make any useful comment.
> So item_height seems to be referencing a parent with a height of about
> 96, rather than 768.
>
> This is in a VMWare Player environment running Lubuntu 14.04.
>
> Is this a known problem, or is there an explanation/workaround?
>
> (I also realized as I got into this that I will run into a problem with
> different aspect ratios, so other than creating at least two themes for
> the commonest aspect ratios, I'd be interested in a tip there as well if
> there is a solution.)
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Grub2 theme bug with relative numeric values for boot_menu?
2014-06-02 13:59 ` Andrey Borzenkov
@ 2014-06-02 16:06 ` John Hupp
2014-06-02 16:47 ` Andrey Borzenkov
0 siblings, 1 reply; 4+ messages in thread
From: John Hupp @ 2014-06-02 16:06 UTC (permalink / raw)
To: Andrey Borzenkov, The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 2692 bytes --]
On 6/2/2014 9:59 AM, Andrey Borzenkov wrote:
> В Mon, 26 May 2014 18:19:23 -0400
> John Hupp <grub-dev@prpcompany.com> пишет:
>
>> I'm trying to make my theme completely resolution-independent. You can
>> see a current screen shot at Post your Grub 2 Themes
>> <http://ubuntuforums.org/showthread.php?t=1823915&page=14&p=13031738#post13031738>
>>
> Pictures are blocked for guests.
Thanks for replying.
Here it is:
>
>> Grub responded well to % values for the numeric values in the progress
>> bar and labels. Also OK with %'s for boot_menu properties top, left,
>> height, width.
>>
>> But I'm getting bad behavior with item_height and the other properties.
>> For a 1024x768 grub display and an original setting of item_height = 26,
>> I can't get equivalent output unless I set item_height = 27%
>>
> These properties do not even understand proportional units. If you are
> using modified grub which adds support for it, please post patch,
> otherwise it is impossible to make any useful comment.
I did not know that these properties do not understand proportional
units. The documentation indicated that ALL numeric property values
could be absolute or relative/proportional. Regardless of that, I
realized as I was working on it that unless relative value support
extended to decimal values and not just integers, then I could not
achieve what I was aiming for, because small values like item height,
padding, etc., do not convert very precisely to integer percentages.
But even if there were support for decimal relative values, I also
realized that I would have a problem getting equivalent displays under
different screen aspect ratios. This is especially true for icon height
and width: an icon that is square under one aspect ratio would be
rectangular under another.
So under the current grub scheme, we can make themes that are somewhat
resolution-independent: the menu footprint and location, and label and
progress bar locations will scale, but the menu items' properties must
be absolute, meaning that they will be relatively large on some displays
and small on others. And I grant that this problem may be difficult to
solve without adding a lot of code.
>
>> So item_height seems to be referencing a parent with a height of about
>> 96, rather than 768.
>>
>> This is in a VMWare Player environment running Lubuntu 14.04.
>>
>> Is this a known problem, or is there an explanation/workaround?
>>
>> (I also realized as I got into this that I will run into a problem with
>> different aspect ratios, so other than creating at least two themes for
>> the commonest aspect ratios, I'd be interested in a tip there as well if
>> there is a solution.)
[-- Attachment #2.1: Type: text/html, Size: 3983 bytes --]
[-- Attachment #2.2: ibggehgd.png --]
[-- Type: image/png, Size: 198161 bytes --]
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: Grub2 theme bug with relative numeric values for boot_menu?
2014-06-02 16:06 ` John Hupp
@ 2014-06-02 16:47 ` Andrey Borzenkov
0 siblings, 0 replies; 4+ messages in thread
From: Andrey Borzenkov @ 2014-06-02 16:47 UTC (permalink / raw)
To: John Hupp; +Cc: The development of GNU GRUB
В Mon, 02 Jun 2014 12:06:03 -0400
John Hupp <grub-dev@prpcompany.com> пишет:
> >
> >> Grub responded well to % values for the numeric values in the progress
> >> bar and labels. Also OK with %'s for boot_menu properties top, left,
> >> height, width.
> >>
> >> But I'm getting bad behavior with item_height and the other properties.
> >> For a 1024x768 grub display and an original setting of item_height = 26,
> >> I can't get equivalent output unless I set item_height = 27%
> >>
> > These properties do not even understand proportional units. If you are
> > using modified grub which adds support for it, please post patch,
> > otherwise it is impossible to make any useful comment.
>
> I did not know that these properties do not understand proportional
> units. The documentation indicated that ALL numeric property values
> could be absolute or relative/proportional.
I re-checked grub2 manual for 2.00 and it explicitly says that
item_height is in pixel; it lists several properties for which support
for proportional units is explicitly stated. So either you are using
different manual (coming from your distribution?) or probably
misunderstood it. In which case it would help if you suggested
corrections that make it more clear.
I guess that grub simply ignored '%' and interpreted value as absolute
one.
Or your grub does support proportional units for item_height indeed,
then it is distribution-specific patch.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2014-06-02 16:47 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-05-26 22:19 Grub2 theme bug with relative numeric values for boot_menu? John Hupp
2014-06-02 13:59 ` Andrey Borzenkov
2014-06-02 16:06 ` John Hupp
2014-06-02 16:47 ` Andrey Borzenkov
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).