Jump to content

Vector Themes


Slice
 Share

455 posts in this topic

Recommended Posts

  • 6 months later...

Hmm, I guess no one is trying to edit or create vector themes :wink_anim:

 

I've got a question. I was just trying to scale Clovy from 1366x768 to 2560x1440 to make the icons appear not so large and change the font from Roboto to Avenir. I choose just the background element and scaled them and changed the fonts. That worked perfectly and now the icon are smaller on the screen.

 

But, now all the menus are non existent, none of the labels show up. What am I doing wrong? Even if I just change the background elements and not touch the fonts the same thing happens.

Link to comment
Share on other sites

11 hours ago, pkdesign said:

This was what I did:

theme.svg

Open it with TextEdit and see font usage

.st8{font-family:'RobotoCondensed-Regular';}

If you want to use Avenir instead then you have to correct this line.

Link to comment
Share on other sites

I was editing the files with Adobe Illustrator. I thought that was fine.

 

So I decided to edit one item at a time. I opened the original Clovy with TextEdit, changed the indicated line to "Avenir-Medium" (the postscript name for the font) saved and restarted. This did not change the font. I tried HelveticaNeue but that did nothing either.

 

Although, if I open that file in Illustrator, the font change is there.

Edited by pkdesign
Link to comment
Share on other sites

But where is the font?

Illustrator thinks it is in the system. Clover does not. It works before a system loaded.

Clover want the font to be embedded in the theme or attached in the same folder. See theme "cesium" with five fonts used. Two embedded and three attached.

Link to comment
Share on other sites

10 hours ago, pkdesign said:

I was editing the files with Adobe Illustrator. I thought that was fine.

 

So I decided to edit one item at a time. I opened the original Clovy with TextEdit, changed the indicated line to "Avenir-Medium" (the postscript name for the font) saved and restarted. This did not change the font. I tried HelveticaNeue but that did nothing either.

 

Although, if I open that file in Illustrator, the font change is there.

I think you should very carefully read the instructions

Scalable Themes

Link to comment
Share on other sites

I think I finally have this working! It is a bit complicated but ultimately rewarding.

 

I have two questions, 1) I see no icon for "Boot UEFI internal from System." This seems to happen in several themes including Clovy:

 

IMG_4120.thumb.jpg.8d4364513802c65b2dccdcb35306ebe8.jpg

 

2) I see a "selection indicator" in the template which seem like an alternative to "selection big" but how do I activate it rather than the selection big"?

IMG_4120.png

Link to comment
Share on other sites

Selection_indicator was invented for BootCampStyle. If you want to see it you have to edit your theme.svg

<clover:theme
BootCampStyle="1"

 

Link to comment
Share on other sites

Just tried latest Clover release 5117 with BGM SVG and the UI is correctly rendering it again. Nice!

And I no longer have a hang after choosing to boot an OS (which I used to get many moons back).

Well done Clover devs :)

 

 

screenshot0.jpg

  • Like 1
Link to comment
Share on other sites

Okay, I think I've finally finished my first SVG theme and got it just the way I want it. It is designed for 2K or 4K displays but will work with a 1920x1080 display.

 

If this is correct and meets your approval I'd love to add it to theme repository. I have no idea how to do that.

 

 

Purple_Swirl.zip

Link to comment
Share on other sites

12 hours ago, pkdesign said:

Okay, I think I've finally finished my first SVG theme and got it just the way I want it. It is designed for 2K or 4K displays but will work with a 1920x1080 display.

 

If this is correct and meets your approval I'd love to add it to theme repository. I have no idea how to do that.

 

 

Purple_Swirl.zip

Welcome to svg crew!

It's a pity it is not good working in low resolution while it should be scalable. You have to improve it.

Link to comment
Share on other sites

@Slice

 

I posted the other day that I could load my BGM_SVG theme with r5117 but I've not been able to load it again since. What I see is the grey background of the embedded theme, with no icons, but the green font is correct.?

 

Looking at bootlog I see

0:103  0:000  === [ GetListOfThemes ] =========================
0:106  0:002  - [00]: BGM_SVG
0:117  0:010  - [01]: Flat3
0:120  0:003  - [02]: Clovy
....
7:426  0:000  === [ InitXTheme ] ==============================
7:463  0:037  Theme view-bounds: w=1366.000000 h=768.000000 units=px
7:463  0:000  using scale 1.406250
7:549  0:086   Background parsed [1688, 1080]
7:550  0:000  Banner position at parse [594,164]
7:556  0:006   parsed banner->width=741 height=411
8:056  0:500  got day icon 24 name{selection_small}
8:056  0:000  got day icon 23 name{logo}
8:056  0:000  got day icon 101 name{scrollbar_holder}
8:056  0:000  got day icon 45 name{os_vista}
8:056  0:000  got day icon 46 name{radio_button}
8:056  0:000  got day icon 47 name{radio_button_selected}
8:056  0:000  got day icon 48 name{checkbox}
8:056  0:000  svg file theme.svg not parsed
8:056  0:000  theme BGM_SVG chosen from nvram is absent, using theme defined in config: BGM_SVG
8:088  0:031  Theme view-bounds: w=1366.000000 h=768.000000 units=px
8:088  0:000  using scale 1.406250
8:172  0:084   Background parsed [1688, 1080]
8:172  0:000  Banner position at parse [594,164]
8:179  0:006   parsed banner->width=741 height=411
8:679  0:500  got day icon 24 name{selection_small}
8:679  0:000  got day icon 23 name{logo}
8:679  0:000  got day icon 101 name{scrollbar_holder}
8:679  0:000  got day icon 45 name{os_vista}
8:679  0:000  got day icon 46 name{radio_button}
8:679  0:000  got day icon 47 name{radio_button_selected}
8:679  0:000  got day icon 48 name{checkbox}
8:679  0:000  svg file theme.svg not parsed
8:679  0:000  GlobalConfig: BGM_SVG not found, get embedded theme
8:679  0:000   using embedded theme

So with 'svg file theme.svg not parsed' I guess there's an error parsing the theme? But why? I have not changed the theme file. 

 

EDIT: Scrapped memory question and memmap.. (for now)

 

EDIT2: Testing old clover releases, my guess is it started in Clover r5109.

 

With: r5108

9:525  0:000  === [ InitTheme ] ===============================
9:525  0:000  use daylight theme
9:565  0:039  Theme view-bounds: w=1366 h=768 units=px
9:565  0:000  using scale 1.406250
9:565  0:000  theme contains font-family=PTMono-Regular
9:676  0:111  background parsed
9:677  0:000  Banner position at parse [594,164]
9:704  0:027  Banner parsed
9:704  0:000  parsed banner->width=741
9:723  0:019   icon 9 not parsed take common icons\tool_part
9:723  0:000   icon 10 not parsed take common icons\tool_rescue
9:730  0:006   icon 15 not parsed take common icons\vol_firewire
9:750  0:020  icon main size=[203,203]
9:761  0:011  OSicon os_tiger not parsed
9:901  0:140  OSicon os_cata not parsed
9:983  0:082  OSicon scrollbar_background not parsed
9:984  0:000  OSicon scrollbar_holder not parsed
9:984  0:000  parsing theme finish

With: r5110

9:513  0:000  === [ InitXTheme ] ==============================
9:513  0:000  use daylight theme
9:553  0:039  Theme view-bounds: w=1366.000000 h=768.000000 units=px
9:553  0:000  using scale 1.406250
9:691  0:138   Background parsed [1688, 1080]
9:691  0:000  Banner position at parse [594,164]
9:720  0:028  Banner parsed
9:720  0:000   parsed banner->width=741 height=411
10:303  0:583  svg file theme.svg not parsed
10:303  0:000  GlobalConfig: BGM_SVG not found, get embedded theme
10:303  0:000   using embedded theme
10:303  0:000  got embedded sound

So with r5109 when big changes where made.. Maybe issue is somewhere in /rEFIt_UEFI/libeg/VectorGraphics.cpp 

ParseSVGXTheme()?

 

 

14 hours ago, pkdesign said:

Okay, I think I've finally finished my first SVG theme

Well done @pkdesign 

Good to see someone else trying vector themes.

Edited by blackosx
  • Thanks 1
Link to comment
Share on other sites

okay.. I've got this far with 5117 by uncommenting the DBG statements

 

9:562  0:000  === [ InitXTheme ] ==============================
9:562  0:000  use Daylight theme
9:602  0:040  Theme view-bounds: w=1366.000000 h=768.000000 units=px
9:602  0:000  using scale 1.406250
9:741  0:138   Background parsed [1688, 1080]
9:741  0:000  Banner position at parse [594,164]
9:769  0:028   parsed banner->width=741 height=411
9:772  0:002  parse func_about status Success
9:776  0:004  parse func_options status Success
9:780  0:004  parse func_clover status Success
9:785  0:004  parse func_secureboot status Success
9:788  0:003  parse func_secureboot_config status Success
9:792  0:003  parse func_reset status Success
9:797  0:004  parse func_shutdown status Success
9:801  0:004  parse func_help status Success
9:805  0:004  parse tool_shell status Success
9:807  0:002  parse tool_part status Not Found
9:808  0:000  parse tool_rescue status Not Found
9:808  0:000  parse pointer status Success
9:811  0:002  parse vol_internal status Success
9:816  0:004  parse vol_external status Success
9:820  0:003  parse vol_optical status Success
9:822  0:001  parse vol_firewire status Not Found
9:825  0:003  parse vol_clover status Success
9:831  0:006  parse vol_internal_hfs status Success
9:837  0:006  parse vol_internal_apfs status Success
9:844  0:006  parse vol_internal_ntfs status Success
9:851  0:007  parse vol_internal_ext3 status Success
9:856  0:005  parse vol_recovery status Success
9:859  0:002  parse selection_small status Success
9:863  0:004  parse selection_big status Success
9:881  0:017  parse os_mac status Success
9:893  0:011  parse os_tiger status Not Found
9:904  0:011  parse os_leo status Success
9:937  0:032  parse os_snow status Success
9:975  0:038  parse os_lion status Success
10:011  0:036  parse os_cougar status Success
10:041  0:029  parse os_mav status Success
10:062  0:021  parse os_yos status Success
10:083  0:020  parse os_cap status Success
10:108  0:024  parse os_sierra status Success
10:137  0:029  parse os_hsierra status Success
10:165  0:027  parse os_moja status Success
10:178  0:013  parse os_cata status Not Found
10:191  0:012  parse os_linux status Success
10:216  0:024  parse os_ubuntu status Success
10:239  0:023  parse os_suse status Success
10:262  0:023  parse os_freebsd status Success
10:286  0:023  parse os_freedos status Success
10:309  0:023  parse os_win status Success
10:332  0:023  parse os_vista status Success
10:344  0:011  parse radio_button status Success
10:345  0:000  parse radio_button_selected status Success
10:345  0:000  parse checkbox status Success
10:346  0:000  parse checkbox_checked status Success
10:358  0:011  parse os_unknown i=51 status Success
10:370  0:012  parse os_clover i=52 status Not Found
10:371  0:000  parsing svg theme finished
10:371  0:000  svg file theme.svg not parsed
10:371  0:000  GlobalConfig: BGM_SVG not found, get embedded theme
10:371  0:000   using embedded theme

Could it be that BGM_SVG does not include selection_indicator?

in /rEFIt_UEFI/libeg/VectorGraphics.cpp 

  //selection for bootcampstyle
  XIcon *NewIcon = new XIcon(BUILTIN_ICON_SELECTION);
  Status = ParseSVGXIcon(BUILTIN_ICON_SELECTION, "selection_indicator"_XS8, &NewIcon->Image, &NewIcon->ImageSVG);
  if (!EFI_ERROR(Status)) {
    Status = ParseSVGXIcon(BUILTIN_ICON_SELECTION, "selection_indicator_night"_XS8, &NewIcon->ImageNight, &NewIcon->ImageSVGnight);
  }

EDIT:

Yes. Success! :thumbsup_anim:

Adding the selection_indicator code from Clovy theme fixes the issue.

10:306  0:001  parsing svg theme finished
10:306  0:000  Using vector theme 'BGM_SVG' (EFI\CLOVER\themes\BGM_SVG)
10:306  0:000  chosen theme BGM_SVG

So why is 'selection_indicator' mandatory for vector themes now?

 

EDIT2:

Moving forward, can there be some kind of list of all new additions to Clovy theme which other themes MUST also add? Or can VectorGraphics.cpp be changed to not fail parsing because of a new missing element?

 

EDIT3:

It seems my Silver vector theme already had selection_indicator in place and I added it to CloverSgvThemeBuilder in back in January 2019. So my bad for not updating BGM_SVG.

 

 

Edited by blackosx
  • Like 1
Link to comment
Share on other sites

Problem solved. It was due to BGM_SVG not having 'selection_indicator' in theme.svg file. This check in vectorGraphicsApp.cpp returns error status when 'selection_indicator' is missing so theme parsing fails.

 

Can you maybe add a message to bootlog to highlight required missing elements in svg theme file?

 

Link to comment
Share on other sites

6 hours ago, Slice said:

Welcome to svg crew!

It's a pity it is not good working in low resolution while it should be scalable. You have to improve it.

Oh I would love that. How do I make it scalable? Are there some instructions somewhere?

Link to comment
Share on other sites

1 hour ago, blackosx said:

Problem solved. It was due to BGM_SVG not having 'selection_indicator' in theme.svg file. This check in vectorGraphicsApp.cpp returns error status when 'selection_indicator' is missing so theme parsing fails.

 

Can you maybe add a message to bootlog to highlight required missing elements in svg theme file?

 

Thank for the note. No, this is just a bug fixed now. Take Clover commit 3b48782

1 hour ago, pkdesign said:

Oh I would love that. How do I make it scalable? Are there some instructions somewhere?

You have to draw all elements as vectors. Else they will be replaced by embedded icons which are not scalable.

  • Thanks 1
Link to comment
Share on other sites

2 hours ago, Slice said:

You have to draw all elements as vectors. Else they will be replaced by embedded icons which are not scalable.

Everything in the theme is vector based. There are no raster images at all.

 

Theme scales beautifully up and down. My only comment is that the icons appear small-ish at lower resolutions, not rasterized.

 

I don’t like giant icons at 2 and 4K so they are drawn at 152 px.

 

How do you keep hard drive icons always a particular size relative to the screen, i.e 144px icon no matter if your screen resolution is 1980 or 2560 or 3840

Edited by pkdesign
Link to comment
Share on other sites

8 hours ago, pkdesign said:

Everything in the theme is vector based. There are no raster images at all.

 

Theme scales beautifully up and down. My only comment is that the icons appear small-ish at lower resolutions, not rasterized.

 

I don’t like giant icons at 2 and 4K so they are drawn at 152 px.

 

How do you keep hard drive icons always a particular size relative to the screen, i.e 144px icon no matter if your screen resolution is 1980 or 2560 or 3840

O yes, sorry, it works! I was testing with old Clover. Now all is fine.

Снимок экрана 2020-05-21 в 7.34.39.png

Link to comment
Share on other sites

Have no idea why they haven’t gotten more. Yes, at first you gotta figure out structure and some SVG editing but once you do it's not that hard. I plan to make more in the future. :)

 

I'm honored to have my theme including in installer! Thank @Slice

  • Like 1
Link to comment
Share on other sites

 Share

×
×
  • Create New...