Show the shipped chai icon when the user copy is missing
This commit is contained in:
1 parent
e5c0fc3f7d
commit
9a7bbb3fec
2 files changed
+9
-2
No files matched your search
@@ -18,6 +18,7 @@ xdg-desktop-portal-gtk
|
||||
gtk4-layer-shell
|
||||
qt6-wayland
|
||||
qt6-imageformats
|
||||
qt6-svg
|
||||
wl-clipboard
|
||||
wtype
|
||||
socat
|
||||
|
||||
@@ -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()
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user