Skip to content

Build your personal knowledge base with Trilium Notes

feat(tray): support hi-DPI

Elian Doran755774042e47
diff --git a/bin/tray-icons/build-icons.sh b/bin/tray-icons/build-icons.sh
index 2eb0c9ab87..c30f39f528 100644
--- a/bin/tray-icons/build-icons.sh
+++ b/bin/tray-icons/build-icons.sh
@@ -15,6 +15,8 @@ output_dir="$script_dir/../../images/app-icons/tray"
for file in *.svg; do
name=$(basename $file .svg)
- inkscape -w 16 -h 16 "$file" -o "$output_dir/$name-16.png"
- magick "$output_dir/$name-16.png" -channel RGB -negate "$output_dir/$name-inverted-16.png"
+ inkscape -w 16 -h 16 "$file" -o "$output_dir/$name.png"
+ inkscape -w 32 -h 32 "$file" -o "$output_dir/[email protected]"
+ magick "$output_dir/$name.png" -channel RGB -negate "$output_dir/$name-inverted.png"
+ magick "$output_dir/[email protected]" -channel RGB -negate "$output_dir/[email protected]"
done
\ No newline at end of file
diff --git a/images/app-icons/tray/bookmarks-16.png b/images/app-icons/tray/bookmarks-16.png
deleted file mode 100644
index 31504fcb7d..0000000000
Binary files a/images/app-icons/tray/bookmarks-16.png and /dev/null differ
diff --git a/images/app-icons/tray/bookmarks-inverted-16.png b/images/app-icons/tray/bookmarks-inverted-16.png
deleted file mode 100644
index 8992272dd0..0000000000
Binary files a/images/app-icons/tray/bookmarks-inverted-16.png and /dev/null differ
diff --git a/images/app-icons/tray/bookmarks-inverted.png b/images/app-icons/tray/bookmarks-inverted.png
new file mode 100644
index 0000000000..6afa62b880
Binary files /dev/null and b/images/app-icons/tray/bookmarks-inverted.png differ
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..92c37ae4fb
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/bookmarks.png b/images/app-icons/tray/bookmarks.png
new file mode 100644
index 0000000000..03130efe09
Binary files /dev/null and b/images/app-icons/tray/bookmarks.png differ
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..fce73f1aef
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/close-inverted-16.png b/images/app-icons/tray/close-inverted-16.png
deleted file mode 100644
index 03f5c75d17..0000000000
Binary files a/images/app-icons/tray/close-inverted-16.png and /dev/null differ
diff --git a/images/app-icons/tray/close-inverted.png b/images/app-icons/tray/close-inverted.png
new file mode 100644
index 0000000000..8678747169
Binary files /dev/null and b/images/app-icons/tray/close-inverted.png differ
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..c368f276b1
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/close-16.png b/images/app-icons/tray/close.png
similarity index 100%
rename from images/app-icons/tray/close-16.png
rename to images/app-icons/tray/close.png
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..ef0992e9be
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/new-note-inverted-16.png b/images/app-icons/tray/new-note-inverted-16.png
deleted file mode 100644
index bc31618d8c..0000000000
Binary files a/images/app-icons/tray/new-note-inverted-16.png and /dev/null differ
diff --git a/images/app-icons/tray/new-note-inverted.png b/images/app-icons/tray/new-note-inverted.png
new file mode 100644
index 0000000000..aebc69be3d
Binary files /dev/null and b/images/app-icons/tray/new-note-inverted.png differ
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..383fe21fbd
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/new-note-16.png b/images/app-icons/tray/new-note.png
similarity index 100%
rename from images/app-icons/tray/new-note-16.png
rename to images/app-icons/tray/new-note.png
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..d12b5f79bd
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/recents-16.png b/images/app-icons/tray/recents-16.png
deleted file mode 100644
index 8f64674c75..0000000000
Binary files a/images/app-icons/tray/recents-16.png and /dev/null differ
diff --git a/images/app-icons/tray/recents-inverted-16.png b/images/app-icons/tray/recents-inverted-16.png
deleted file mode 100644
index 1db7691480..0000000000
Binary files a/images/app-icons/tray/recents-inverted-16.png and /dev/null differ
diff --git a/images/app-icons/tray/recents-inverted.png b/images/app-icons/tray/recents-inverted.png
new file mode 100644
index 0000000000..cc5c149100
Binary files /dev/null and b/images/app-icons/tray/recents-inverted.png differ
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..dc999e14ad
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/recents.png b/images/app-icons/tray/recents.png
new file mode 100644
index 0000000000..4e44a960cd
Binary files /dev/null and b/images/app-icons/tray/recents.png differ
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..f43e78964d
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/today-16.png b/images/app-icons/tray/today-16.png
deleted file mode 100644
index c37f139c82..0000000000
Binary files a/images/app-icons/tray/today-16.png and /dev/null differ
diff --git a/images/app-icons/tray/today-inverted-16.png b/images/app-icons/tray/today-inverted-16.png
deleted file mode 100644
index 73710e5e71..0000000000
Binary files a/images/app-icons/tray/today-inverted-16.png and /dev/null differ
diff --git a/images/app-icons/tray/today-inverted.png b/images/app-icons/tray/today-inverted.png
new file mode 100644
index 0000000000..96400f53f5
Binary files /dev/null and b/images/app-icons/tray/today-inverted.png differ
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..f1201a90e6
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/images/app-icons/tray/today.png b/images/app-icons/tray/today.png
new file mode 100644
index 0000000000..2ad40f1b3d
Binary files /dev/null and b/images/app-icons/tray/today.png differ
diff --git a/images/app-icons/tray/[email protected] b/images/app-icons/tray/[email protected]
new file mode 100644
index 0000000000..d248177b6c
Binary files /dev/null and b/images/app-icons/tray/[email protected] differ
diff --git a/src/services/tray.ts b/src/services/tray.ts
index 2388925bfa..029a166b8b 100644
--- a/src/services/tray.ts
+++ b/src/services/tray.ts
@@ -38,9 +38,7 @@ function getTrayIconPath() {
}
function getIconPath(name: string) {
- const size = 16;
- let suffix = (nativeTheme.shouldUseDarkColors ? "-inverted" : "");
- suffix += `-${size}`;
+ const suffix = (nativeTheme.shouldUseDarkColors ? "-inverted" : "");
return path.join(path.dirname(fileURLToPath(import.meta.url)), "../..", "images", "app-icons", "tray", `${name}${suffix}.png`);
}