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