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:
@@ -49,6 +49,14 @@ Item {
|
|||||||
readonly property string iconPath: {
|
readonly property string iconPath: {
|
||||||
if (hasSpecialPrefix || !iconValue)
|
if (hasSpecialPrefix || !iconValue)
|
||||||
return "";
|
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);
|
return Quickshell.iconPath(iconValue, true) || DesktopService.resolveIconPath(iconValue);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user