quickshell: use Quickshell.iconPath for app stream icons
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
9e636e92d5
commit
d5a3d1e389
1 changed files with 7 additions and 7 deletions
|
|
@ -1500,11 +1500,11 @@ in
|
|||
objects: [modelData]
|
||||
}
|
||||
|
||||
property string appIcon: {
|
||||
property string appIconPath: {
|
||||
let icon = modelData.properties["application.icon-name"] || "";
|
||||
if (icon !== "") return icon;
|
||||
let name = (modelData.properties["application.name"] || modelData.name || "").toLowerCase();
|
||||
return name;
|
||||
if (icon === "") icon = (modelData.properties["application.name"] || modelData.name || "").toLowerCase();
|
||||
if (icon === "") return "";
|
||||
return Quickshell.iconPath(icon, true) || "";
|
||||
}
|
||||
|
||||
Row {
|
||||
|
|
@ -1515,12 +1515,12 @@ in
|
|||
width: 14
|
||||
height: 14
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: appIcon !== ""
|
||||
visible: appIconPath !== ""
|
||||
|
||||
Image {
|
||||
id: appStreamIcon
|
||||
anchors.fill: parent
|
||||
source: appIcon !== "" ? "image://icon/" + appIcon : ""
|
||||
source: appIconPath
|
||||
sourceSize.width: 14
|
||||
sourceSize.height: 14
|
||||
smooth: true
|
||||
|
|
@ -1539,7 +1539,7 @@ in
|
|||
font.family: "FiraMono Nerd Font"
|
||||
font.pixelSize: 11
|
||||
elide: Text.ElideRight
|
||||
width: parent.width - (appIcon !== "" ? 20 : 0)
|
||||
width: parent.width - (appIconPath !== "" ? 20 : 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue