1
0
mirror of https://github.com/AvengeMedia/DankMaterialShell.git synced 2026-04-30 17:42:06 -04:00

launcher: add indicators for flatpak/snap/appimage/nix

fixes #2251
This commit is contained in:
bbedward
2026-04-21 14:03:47 -04:00
parent 9139fd2fb1
commit cf382c0322
11 changed files with 560 additions and 1 deletions

View File

@@ -0,0 +1,32 @@
import QtQuick
import Quickshell.Widgets
Item {
id: root
property string source: ""
property int glyphSize: 14
readonly property var sourceAsset: ({
"flatpak": "../../assets/package-sources/flatpak.svg",
"snap": "../../assets/package-sources/snap.svg",
"appimage": "../../assets/package-sources/appimage.svg",
"nix": "../../assets/package-sources/nix.svg"
})
readonly property string assetPath: sourceAsset[source] || ""
visible: assetPath.length > 0
implicitWidth: glyphSize
implicitHeight: glyphSize
IconImage {
anchors.fill: parent
source: root.assetPath ? Qt.resolvedUrl(root.assetPath) : ""
implicitSize: root.glyphSize * 2
backer.sourceSize: Qt.size(root.glyphSize * 2, root.glyphSize * 2)
smooth: true
mipmap: true
asynchronous: true
}
}