* Conditional themes?
@ 2012-10-04 14:09 Dr. Tilmann Bubeck
2012-10-05 2:22 ` Gerard Butler
` (2 more replies)
0 siblings, 3 replies; 5+ messages in thread
From: Dr. Tilmann Bubeck @ 2012-10-04 14:09 UTC (permalink / raw)
To: grub-devel
Hello GRUB,
are there plans to make theming conditional, depending on screen
resolution? Today you have one theme, which is used for all screen
resolutions from 320x200 up to 1600x800. When using "gfxmode=auto" you do
not really know, which resolution you get. The theme may look ugly or may
be completly unusable (see
https://bugzilla.redhat.com/show_bug.cgi?id=850783).
I could think of some application logic in grub.cfg, e.g.
if [ "${gfxwidth}" -lt 800 ]; then
theme=${root}/grub2/themes/small
else
theme=${root}/grub2/themes/large
fi
What do you think about that?
An even more general idea would be to implement a shellish backticks
operator $() and extend some commands to print out information (here
"videoinfo"), like:
width=$(videoinfo --show-width)
if [ "${width}" -lt 800 ]; then
theme=${root}/grub2/themes/small
else
theme=${root}/grub2/themes/large
fi
Any comments?
Kind regards,
Tilmann
+-------+-------------------------------------------------------------+
| | dr. tilmann bubeck reinform medien- und |
| | informationstechnologie AG |
| rein | fon : +49 (711) 7 82 76-52 loeffelstr. 40 |
| form | fax : +49 (711) 7 82 76-46 70597 stuttgart / germany |
| AG | cell.: +49 (172) 8 84 29 72 fon: +49 (711) 75 86 56-10 |
| | email: t.bubeck@reinform.de http://www.reinform.de |
| +-------------------------------------------------------------+
| | pflichtangaben nach paragraph 80, AktG: |
| | reinform medien- und informationstechnologie AG, stuttgart |
| | handelsregister stuttgart, HRB 23001 |
| | vorstand: dr. tilmann bubeck (vorsitz) |
| | aufsichtsrat: frank stege (vorsitz) |
+-------+-------------------------------------------------------------+
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Conditional themes?
2012-10-04 14:09 Conditional themes? Dr. Tilmann Bubeck
@ 2012-10-05 2:22 ` Gerard Butler
2012-10-06 11:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-10-05 3:01 ` Andrey Borzenkov
2012-10-06 15:12 ` Dr. Tilmann Bubeck
2 siblings, 1 reply; 5+ messages in thread
From: Gerard Butler @ 2012-10-05 2:22 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 3020 bytes --]
You can make your theme dynamic by using percentages in your theme.txt (so then when you change the values in grub.cfg to a different resolution the theme file will work just fine). However when grub stretches certain images it can make the appearance a bit unsightly. Over the past year of working with grub themes (I've made 18 in total) I found a couple methods to over come this. You could make a theme for every resolution, which I don't recommend because it is a lot more work. The other way is to stick to using elements that won't look bad after being stretched such as solid colored elements, or simple gradients.
> To: grub-devel@gnu.org
> Subject: Conditional themes?
> Date: Thu, 4 Oct 2012 16:09:10 +0200
> From: t.bubeck@reinform.de
>
> Hello GRUB,
>
> are there plans to make theming conditional, depending on screen
> resolution? Today you have one theme, which is used for all screen
> resolutions from 320x200 up to 1600x800. When using "gfxmode=auto" you do
> not really know, which resolution you get. The theme may look ugly or may
> be completly unusable (see
> https://bugzilla.redhat.com/show_bug.cgi?id=850783).
>
> I could think of some application logic in grub.cfg, e.g.
>
> if [ "${gfxwidth}" -lt 800 ]; then
> theme=${root}/grub2/themes/small
> else
> theme=${root}/grub2/themes/large
> fi
>
> What do you think about that?
>
> An even more general idea would be to implement a shellish backticks
> operator $() and extend some commands to print out information (here
> "videoinfo"), like:
>
> width=$(videoinfo --show-width)
> if [ "${width}" -lt 800 ]; then
> theme=${root}/grub2/themes/small
> else
> theme=${root}/grub2/themes/large
> fi
>
> Any comments?
>
> Kind regards,
> Tilmann
>
> +-------+-------------------------------------------------------------+
> | | dr. tilmann bubeck reinform medien- und |
> | | informationstechnologie AG |
> | rein | fon : +49 (711) 7 82 76-52 loeffelstr. 40 |
> | form | fax : +49 (711) 7 82 76-46 70597 stuttgart / germany |
> | AG | cell.: +49 (172) 8 84 29 72 fon: +49 (711) 75 86 56-10 |
> | | email: t.bubeck@reinform.de http://www.reinform.de |
> | +-------------------------------------------------------------+
> | | pflichtangaben nach paragraph 80, AktG: |
> | | reinform medien- und informationstechnologie AG, stuttgart |
> | | handelsregister stuttgart, HRB 23001 |
> | | vorstand: dr. tilmann bubeck (vorsitz) |
> | | aufsichtsrat: frank stege (vorsitz) |
> +-------+-------------------------------------------------------------+
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> https://lists.gnu.org/mailman/listinfo/grub-devel
[-- Attachment #2: Type: text/html, Size: 3583 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Conditional themes?
2012-10-04 14:09 Conditional themes? Dr. Tilmann Bubeck
2012-10-05 2:22 ` Gerard Butler
@ 2012-10-05 3:01 ` Andrey Borzenkov
2012-10-06 15:12 ` Dr. Tilmann Bubeck
2 siblings, 0 replies; 5+ messages in thread
From: Andrey Borzenkov @ 2012-10-05 3:01 UTC (permalink / raw)
To: The development of GNU GRUB
В Чт., 04/10/2012 в 16:09 +0200, Dr. Tilmann Bubeck пишет:
> An even more general idea would be to implement a shellish backticks
> operator $() and extend some commands to print out information (here
> "videoinfo"), like:
>
> width=$(videoinfo --show-width)
> if [ "${width}" -lt 800 ]; then
> theme=${root}/grub2/themes/small
> else
> theme=${root}/grub2/themes/large
> fi
>
While I miss this possibility every now and then, for this particular
use case you can simply extend videoinfo with something like
videoinfo --show-width --set width
similar to what "search --set ..." does.
-andrey
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Conditional themes?
2012-10-05 2:22 ` Gerard Butler
@ 2012-10-06 11:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 5+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2012-10-06 11:08 UTC (permalink / raw)
To: grub-devel
[-- Attachment #1: Type: text/plain, Size: 885 bytes --]
On 05.10.2012 04:22, Gerard Butler wrote:
> You can make your theme dynamic by using percentages in your theme.txt
> (so then when you change the values in grub.cfg to a different
> resolution the theme file will work just fine). However when grub
> stretches certain images it can make the appearance a bit unsightly.
> Over the past year of working with grub themes (I've made 18 in total) I
> found a couple methods to over come this. You could make a theme for
> every resolution, which I don't recommend because it is a lot more work.
> The other way is to stick to using elements that won't look bad after
> being stretched such as solid colored elements, or simple gradients.
>
Do you mean supporting different aspect ratios or something
else?`Stretching shouldn't happen if aspect ratio stays the same.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Conditional themes?
2012-10-04 14:09 Conditional themes? Dr. Tilmann Bubeck
2012-10-05 2:22 ` Gerard Butler
2012-10-05 3:01 ` Andrey Borzenkov
@ 2012-10-06 15:12 ` Dr. Tilmann Bubeck
2 siblings, 0 replies; 5+ messages in thread
From: Dr. Tilmann Bubeck @ 2012-10-06 15:12 UTC (permalink / raw)
To: grub-devel
Hello!
> You can make your theme dynamic by using percentages in your theme.txt
Yes, this is right, but sometimes not enough. If you think of a 640x480
screen and compare its theme with a 1200x800 screen, than you see, that
totally different themes are needed. Its not only percentage. You may
decide to put more information into the boot screen or add more
graphics, which is simply not possible on smaller screens.
Sure, we can offer two independent themes and switch them statically.
But I think of a generic solution having a bundle of themes, which get
selected automatically depending on resolution or other stuff.
> videoinfo --show-width --set width
Your above suggestion is a third method to get the width. We now have:
1. ${gfxwidth}
A variable getting its value automatically.
2. videoinfo --show-width --set width
Extend videoinfo to offer "--show-width" and "--set"
to set the value to a variable.
3. $(videoinfo --show-width)
Extend videoinfo to offer "--show-width" and implement
shell backticks to get that value
Its a matter of taste, so I ask you, the GRUB developers, what you like
more. Number 3 is most generic and most useful for other similar things
and number 1 is the most easiest to implement.
Thanks for any feedback.
Till
Am 04.10.2012 16:09, schrieb Dr. Tilmann Bubeck:
> Hello GRUB,
>
> are there plans to make theming conditional, depending on screen
> resolution? Today you have one theme, which is used for all screen
> resolutions from 320x200 up to 1600x800. When using "gfxmode=auto" you
> do not really know, which resolution you get. The theme may look ugly or
> may be completly unusable (see
> https://bugzilla.redhat.com/show_bug.cgi?id=850783).
>
> I could think of some application logic in grub.cfg, e.g.
>
> if [ "${gfxwidth}" -lt 800 ]; then
> theme=${root}/grub2/themes/small
> else
> theme=${root}/grub2/themes/large
> fi
>
> What do you think about that?
>
> An even more general idea would be to implement a shellish backticks
> operator $() and extend some commands to print out information (here
> "videoinfo"), like:
>
> width=$(videoinfo --show-width)
> if [ "${width}" -lt 800 ]; then
> theme=${root}/grub2/themes/small
> else
> theme=${root}/grub2/themes/large
> fi
>
> Any comments?
>
> Kind regards,
> Tilmann
>
> +-------+-------------------------------------------------------------+
> | | dr. tilmann bubeck reinform medien- und |
> | | informationstechnologie AG |
> | rein | fon : +49 (711) 7 82 76-52 loeffelstr. 40 |
> | form | fax : +49 (711) 7 82 76-46 70597 stuttgart / germany |
> | AG | cell.: +49 (172) 8 84 29 72 fon: +49 (711) 75 86 56-10 |
> | | email: t.bubeck@reinform.de http://www.reinform.de |
> | +-------------------------------------------------------------+
> | | pflichtangaben nach paragraph 80, AktG: |
> | | reinform medien- und informationstechnologie AG, stuttgart |
> | | handelsregister stuttgart, HRB 23001 |
> | | vorstand: dr. tilmann bubeck (vorsitz) |
> | | aufsichtsrat: frank stege (vorsitz) |
> +-------+-------------------------------------------------------------+
--
+-------+-------------------------------------------------------------+
| | dr. tilmann bubeck reinform medien- und |
| | informationstechnologie AG |
| rein | fon : +49 (711) 7 82 76-52 loeffelstr. 40 |
| form | fax : +49 (711) 7 82 76-46 70597 stuttgart / germany |
| AG | cell.: +49 (172) 8 84 29 72 fon: +49 (711) 75 86 56-10 |
| | email: t.bubeck@reinform.de http://www.reinform.de |
| +-------------------------------------------------------------+
| | pflichtangaben nach paragraph 80, AktG: |
| | reinform medien- und informationstechnologie AG, stuttgart |
| | handelsregister stuttgart, HRB 23001 |
| | vorstand: dr. tilmann bubeck (vorsitz) |
| | aufsichtsrat: frank stege (vorsitz) |
+-------+-------------------------------------------------------------+
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-10-06 15:12 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-10-04 14:09 Conditional themes? Dr. Tilmann Bubeck
2012-10-05 2:22 ` Gerard Butler
2012-10-06 11:08 ` Vladimir 'φ-coder/phcoder' Serbinenko
2012-10-05 3:01 ` Andrey Borzenkov
2012-10-06 15:12 ` Dr. Tilmann Bubeck
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.