quickshell: fix app icons with Quickshell.iconPath
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
319314c194
commit
3068492aa7
1 changed files with 8 additions and 13 deletions
|
|
@ -1501,14 +1501,7 @@ in
|
|||
}
|
||||
|
||||
property string appIconName: modelData.properties["application.icon-name"] || ""
|
||||
|
||||
Component.onCompleted: {
|
||||
let props = modelData.properties;
|
||||
console.log("Stream:", modelData.name,
|
||||
"icon-name:", props["application.icon-name"],
|
||||
"app-name:", props["application.name"],
|
||||
"iconPath:", appIconName !== "" ? Quickshell.iconPath(appIconName) : "none");
|
||||
}
|
||||
property string appIconPath: appIconName !== "" ? (Quickshell.iconPath(appIconName) || "") : ""
|
||||
|
||||
Row {
|
||||
width: parent.width
|
||||
|
|
@ -1518,13 +1511,15 @@ in
|
|||
width: 14
|
||||
height: 14
|
||||
anchors.verticalCenter: parent.verticalCenter
|
||||
visible: appIconName !== ""
|
||||
visible: appIconPath !== ""
|
||||
|
||||
IconImage {
|
||||
Image {
|
||||
id: appStreamIcon
|
||||
anchors.fill: parent
|
||||
implicitSize: 14
|
||||
icon: appIconName
|
||||
source: appIconPath
|
||||
sourceSize.width: 14
|
||||
sourceSize.height: 14
|
||||
smooth: true
|
||||
visible: false
|
||||
}
|
||||
ColorOverlay {
|
||||
|
|
@ -1540,7 +1535,7 @@ in
|
|||
font.family: "FiraMono Nerd Font"
|
||||
font.pixelSize: 11
|
||||
elide: Text.ElideRight
|
||||
width: parent.width - (appIconName !== "" ? 20 : 0)
|
||||
width: parent.width - (appIconPath !== "" ? 20 : 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue