Skip to content

Conversation

@seflerZ
Copy link

@seflerZ seflerZ commented Apr 8, 2022

Based on #657. The SVG icon format has been supported but disabled by default because lack of librsvg2 lib. This issue reports librsvg has been added to Microsoft Mariner repository, so lib can be added to runtime image now.

Attention: This will not show your SVG icons in WSLg because the weston runtime has hard coded the icon path in /rpdrail-shell/app-list.c as the following code shows:

char *icon_folder[] = {
	"/usr/share/pixmaps/",
	"/usr/share/icons/hicolor/96x96/apps/",
	"/usr/share/icons/hicolor/128x128/apps/",
	"/usr/share/icons/hicolor/48x48/apps/",
	"/usr/share/icons/hicolor/32x32/apps/",
	"/usr/share/icons/hicolor/24x24/apps/",
	"/usr/share/icons/hicolor/22x22/apps/",
	"/usr/share/icons/hicolor/16x16/apps/",
	"/usr/share/icons/HighContrast/96x96/apps/",
	"/usr/share/icons/HighContrast/128x128/apps/",
	"/usr/share/icons/HighContrast/48x48/apps/",
	"/usr/share/icons/HighContrast/32x32/apps/",
	"/usr/share/icons/HighContrast/24x24/apps/",
	"/usr/share/icons/HighContrast/22x22/apps/",
	"/usr/share/icons/HighContrast/16x16/apps/",
	"/usr/share/icons/hicolor/scalable/apps/", /* use scalable(= svg) only when no png. */
	"/usr/share/icons/HighContrast/scalable/apps/", /* use scalable (= svg) only when no png. */
};

But you can change the source code and recompile it. Once you did that, the SVG icon will display. So this PR only add missing runtime libs.

Here are the SVG icons displayed in Win11 start menu:
image

@seflerZ seflerZ closed this Apr 8, 2022
@seflerZ
Copy link
Author

seflerZ commented Apr 8, 2022

duplicated on #657

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant