fix: use icon-missing image always for fallback
This commit is contained in:
parent
e7fc5c05af
commit
24d4c6cc3b
4 changed files with 6 additions and 6 deletions
|
|
@ -127,7 +127,7 @@ Item {
|
||||||
|
|
||||||
Layout.alignment: Qt.AlignVCenter
|
Layout.alignment: Qt.AlignVCenter
|
||||||
implicitSize: 36
|
implicitSize: 36
|
||||||
source: Icons.getAppIcon(toplevel?.lastIpcObject.class ?? "", "")
|
source: Icons.getAppIcon(toplevel?.lastIpcObject.class ?? "")
|
||||||
}
|
}
|
||||||
|
|
||||||
ColumnLayout {
|
ColumnLayout {
|
||||||
|
|
|
||||||
|
|
@ -110,8 +110,8 @@ Item {
|
||||||
source: {
|
source: {
|
||||||
const icon = entry.modelData.properties["application.icon-name"];
|
const icon = entry.modelData.properties["application.icon-name"];
|
||||||
if (icon)
|
if (icon)
|
||||||
return Icons.getAppIcon(icon, "icon-missing");
|
return Icons.getAppIcon(icon);
|
||||||
Icons.getAppIcon(entry.modelData.name, "icon-missing")
|
Icons.getAppIcon(entry.modelData?.name ?? "")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -377,7 +377,7 @@ Item {
|
||||||
|
|
||||||
anchors.centerIn: parent
|
anchors.centerIn: parent
|
||||||
implicitSize: Math.min(48, window.width * 0.5, window.height * 0.5)
|
implicitSize: Math.min(48, window.width * 0.5, window.height * 0.5)
|
||||||
source: Icons.getAppIcon(window.ipc?.class ?? "", "")
|
source: Icons.getAppIcon(window.ipc?.class ?? "")
|
||||||
}
|
}
|
||||||
|
|
||||||
// Interactions
|
// Interactions
|
||||||
|
|
|
||||||
|
|
@ -139,8 +139,8 @@ Singleton {
|
||||||
return DesktopEntries.applications.values.find(a => names.includes(a.id.toLowerCase())) ?? null;
|
return DesktopEntries.applications.values.find(a => names.includes(a.id.toLowerCase())) ?? null;
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAppIcon(name: string, fallback: string): string {
|
function getAppIcon(name: string): string {
|
||||||
return Quickshell.iconPath(getDesktopEntry(name)?.icon, fallback);
|
return Quickshell.iconPath(getDesktopEntry(name)?.icon, "icon-missing");
|
||||||
}
|
}
|
||||||
|
|
||||||
function getAppCategoryIcon(name: string, fallback: string): string {
|
function getAppCategoryIcon(name: string, fallback: string): string {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue