Skip to content

Conversation

@hideyukn88
Copy link
Member

enable librsvg2 for SVG format icon.

@seflerZ
Copy link

seflerZ commented Apr 8, 2022

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.

image

@hideyukn88
Copy link
Member Author

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.

image

The whole purpose of this is PR is to add SVG decoder library to the project.

@hideyukn88 hideyukn88 merged commit b473a32 into main Aug 4, 2022
pull bot pushed a commit to QSLee-Net/wslg that referenced this pull request Aug 5, 2022
@hideyukn88 hideyukn88 deleted the enable_librsvg2 branch July 31, 2025 23:40
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.

4 participants