quickshell: drop monochrome app icons from volume dropdown

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
rope 2026-05-27 09:45:39 +01:00
parent 5a046357b8
commit a806fa9b80

View file

@ -556,7 +556,6 @@ in
onChange = qsRestart; onChange = qsRestart;
text = '' text = ''
//@ pragma UseQApplication //@ pragma UseQApplication
//@ pragma IconTheme Papirus-Dark
import Quickshell import Quickshell
import Quickshell.Services.Notifications import Quickshell.Services.Notifications
import QtQuick import QtQuick
@ -1501,47 +1500,13 @@ in
objects: [modelData] objects: [modelData]
} }
property string appIconName: modelData.properties["application.icon-name"] || "" Text {
property string appIconPath: { text: modelData.properties["application.name"] || modelData.name || "Unknown"
if (appIconName === "") return ""; color: Theme.base04
let p = Quickshell.iconPath(appIconName); font.family: "FiraMono Nerd Font"
return p || ""; font.pixelSize: 11
} elide: Text.ElideRight
Row {
width: parent.width width: parent.width
spacing: 6
Item {
width: 14
height: 14
anchors.verticalCenter: parent.verticalCenter
visible: appIconPath !== ""
Image {
id: appStreamIcon
anchors.fill: parent
source: appIconPath
sourceSize.width: 14
sourceSize.height: 14
smooth: true
visible: false
}
ColorOverlay {
anchors.fill: appStreamIcon
source: appStreamIcon
color: Theme.base05
}
}
Text {
text: modelData.properties["application.name"] || modelData.name || "Unknown"
color: Theme.base04
font.family: "FiraMono Nerd Font"
font.pixelSize: 11
elide: Text.ElideRight
width: parent.width - (appIconPath !== "" ? 20 : 0)
}
} }
Row { Row {