1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-03 20:32:07 -04:00

fix(icons): apply file path substitutions in launcher icon resolution (#1877)

Follow-up to #1867. The launcher's AppIconRenderer used its own
Quickshell.iconPath() call without going through appIdSubstitutions,
so PWA icons configured via regex file path rules were not resolved
in the app launcher.

Co-authored-by: odtgit <odtgit@taliops.com>
This commit is contained in:
odt
2026-03-01 21:03:28 +01:00
committed by GitHub
parent 8c9fe84d02
commit f4a10de790

View File

@@ -49,6 +49,14 @@ Item {
readonly property string iconPath: {
if (hasSpecialPrefix || !iconValue)
return "";
const moddedId = Paths.moddedAppId(iconValue);
if (moddedId !== iconValue) {
if (moddedId.startsWith("~") || moddedId.startsWith("/"))
return Paths.toFileUrl(Paths.expandTilde(moddedId));
if (moddedId.startsWith("file://"))
return moddedId;
return Quickshell.iconPath(moddedId, true);
}
return Quickshell.iconPath(iconValue, true) || DesktopService.resolveIconPath(iconValue);
}