fix: add proper app icon fallback
This commit is contained in:
parent
984a840a8d
commit
dba7ff6c97
5 changed files with 10 additions and 3 deletions
BIN
assets/icon-missing.png
Normal file
BIN
assets/icon-missing.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 19 KiB |
4
assets/icon-missing.svg
Normal file
4
assets/icon-missing.svg
Normal file
|
|
@ -0,0 +1,4 @@
|
||||||
|
<?xml version="1.0"?>
|
||||||
|
<svg xmlns="http://www.w3.org/2000/svg" height="512px" viewBox="0 -960 960 960" width="512px" fill="#787c99">
|
||||||
|
<path d="M560-360q17 0 29.5-12.5T602-402q0-17-12.5-29.5T560-444q-17 0-29.5 12.5T518-402q0 17 12.5 29.5T560-360Zm-30-128h60q0-29 6-42.5t28-35.5q30-30 40-48.5t10-43.5q0-45-31.5-73.5T560-760q-41 0-71.5 23T446-676l54 22q9-25 24.5-37.5T560-704q24 0 39 13.5t15 36.5q0 14-8 26.5T578-596q-33 29-40.5 45.5T530-488ZM320-240q-33 0-56.5-23.5T240-320v-480q0-33 23.5-56.5T320-880h480q33 0 56.5 23.5T880-800v480q0 33-23.5 56.5T800-240H320Zm0-80h480v-480H320v480ZM160-80q-33 0-56.5-23.5T80-160v-560h80v560h560v80H160Zm160-720v480-480Z"/>
|
||||||
|
</svg>
|
||||||
|
After Width: | Height: | Size: 663 B |
|
|
@ -110,8 +110,8 @@ Item {
|
||||||
source: {
|
source: {
|
||||||
const icon = entry.modelData.properties["application.icon-name"];
|
const icon = entry.modelData.properties["application.icon-name"];
|
||||||
if (icon)
|
if (icon)
|
||||||
return Icons.getAppIcon(icon, "image-missing");
|
return Icons.getAppIcon(icon, "icon-missing");
|
||||||
Icons.getAppIcon(entry.modelData.name, "image-missing")
|
Icons.getAppIcon(entry.modelData.name, "icon-missing")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -37,7 +37,7 @@ Item {
|
||||||
IconImage {
|
IconImage {
|
||||||
id: icon
|
id: icon
|
||||||
|
|
||||||
source: Quickshell.iconPath(root.modelData?.icon, "image-missing")
|
source: Quickshell.iconPath(root.modelData?.icon, "icon-missing")
|
||||||
implicitSize: parent.height * 0.9
|
implicitSize: parent.height * 0.9
|
||||||
|
|
||||||
anchors.verticalCenter: parent.verticalCenter
|
anchors.verticalCenter: parent.verticalCenter
|
||||||
|
|
|
||||||
|
|
@ -55,6 +55,9 @@ in stdenv.mkDerivation {
|
||||||
|
|
||||||
cp -R . $out/share/${pname}
|
cp -R . $out/share/${pname}
|
||||||
|
|
||||||
|
mkdir -p $out/share/icons/hicolor/512x512/apps/
|
||||||
|
cp assets/icon-missing.png $out/share/icons/hicolor/512x512/apps/
|
||||||
|
|
||||||
makeWrapper ${quickshell}/bin/qs $out/bin/${pname} \
|
makeWrapper ${quickshell}/bin/qs $out/bin/${pname} \
|
||||||
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
|
--prefix PATH : "${lib.makeBinPath runtimeDeps}" \
|
||||||
--set FONTCONFIG_FILE "${fontconfig}" \
|
--set FONTCONFIG_FILE "${fontconfig}" \
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue