Show the shipped chai icon when the user copy is missing

This commit is contained in:
SirBlob committed 2026-09-24 02:23:05 +00:00
1 parent e5c0fc3f7d
commit 9a7bbb3fec
2 files changed
+9 -2

No files matched your search

+1
View File
@@ -18,6 +18,7 @@ xdg-desktop-portal-gtk
gtk4-layer-shell
qt6-wayland
qt6-imageformats
qt6-svg
wl-clipboard
wtype
socat
+8 -2
View File
@@ -8,7 +8,10 @@ BarWidget {
id: root
moduleName: "blob.menu"
readonly property string iconPath: Quickshell.env("HOME") + "/.config/blob/branding/chai.svg"
readonly property string userIconPath: Quickshell.env("HOME") + "/.config/blob/branding/chai.svg"
readonly property string shippedIconPath: Quickshell.env("BLOB_PATH") + "/branding/chai.svg"
property bool useShippedIcon: false
readonly property string iconPath: useShippedIcon ? shippedIconPath : userIconPath
readonly property int iconSize: Math.round(Style.font.body * 1.35)
property string iconSvg: ""
@@ -33,7 +36,10 @@ BarWidget {
watchChanges: true
printErrors: false
onLoaded: root.iconSvg = text()
onLoadFailed: root.iconSvg = ""
onLoadFailed: {
if (!root.useShippedIcon) root.useShippedIcon = true
else root.iconSvg = ""
}
onFileChanged: reload()
}