feat(tray): support hi-DPI
@ -15,6 +15,8 @@ output_dir="$script_dir/../../images/app-icons/tray"
|
|||||||
|
|
||||||
for file in *.svg; do
|
for file in *.svg; do
|
||||||
name=$(basename $file .svg)
|
name=$(basename $file .svg)
|
||||||
inkscape -w 16 -h 16 "$file" -o "$output_dir/$name-16.png"
|
inkscape -w 16 -h 16 "$file" -o "$output_dir/$name.png"
|
||||||
magick "$output_dir/$name-16.png" -channel RGB -negate "$output_dir/$name-inverted-16.png"
|
inkscape -w 32 -h 32 "$file" -o "$output_dir/$name@2x.png"
|
||||||
|
magick "$output_dir/$name.png" -channel RGB -negate "$output_dir/$name-inverted.png"
|
||||||
|
magick "$output_dir/$name@2x.png" -channel RGB -negate "$output_dir/$name-inverted@2x.png"
|
||||||
done
|
done
|
Before Width: | Height: | Size: 314 B |
Before Width: | Height: | Size: 320 B |
BIN
images/app-icons/tray/bookmarks-inverted.png
Normal file
After Width: | Height: | Size: 336 B |
BIN
images/app-icons/tray/bookmarks-inverted@2x.png
Normal file
After Width: | Height: | Size: 456 B |
BIN
images/app-icons/tray/bookmarks.png
Normal file
After Width: | Height: | Size: 314 B |
BIN
images/app-icons/tray/bookmarks@2x.png
Normal file
After Width: | Height: | Size: 493 B |
Before Width: | Height: | Size: 242 B |
BIN
images/app-icons/tray/close-inverted.png
Normal file
After Width: | Height: | Size: 258 B |
BIN
images/app-icons/tray/close-inverted@2x.png
Normal file
After Width: | Height: | Size: 334 B |
Before Width: | Height: | Size: 254 B After Width: | Height: | Size: 254 B |
BIN
images/app-icons/tray/close@2x.png
Normal file
After Width: | Height: | Size: 339 B |
Before Width: | Height: | Size: 236 B |
BIN
images/app-icons/tray/new-note-inverted.png
Normal file
After Width: | Height: | Size: 252 B |
BIN
images/app-icons/tray/new-note-inverted@2x.png
Normal file
After Width: | Height: | Size: 269 B |
Before Width: | Height: | Size: 202 B After Width: | Height: | Size: 202 B |
BIN
images/app-icons/tray/new-note@2x.png
Normal file
After Width: | Height: | Size: 242 B |
Before Width: | Height: | Size: 449 B |
Before Width: | Height: | Size: 425 B |
BIN
images/app-icons/tray/recents-inverted.png
Normal file
After Width: | Height: | Size: 443 B |
BIN
images/app-icons/tray/recents-inverted@2x.png
Normal file
After Width: | Height: | Size: 700 B |
BIN
images/app-icons/tray/recents.png
Normal file
After Width: | Height: | Size: 450 B |
BIN
images/app-icons/tray/recents@2x.png
Normal file
After Width: | Height: | Size: 798 B |
Before Width: | Height: | Size: 379 B |
Before Width: | Height: | Size: 380 B |
BIN
images/app-icons/tray/today-inverted.png
Normal file
After Width: | Height: | Size: 397 B |
BIN
images/app-icons/tray/today-inverted@2x.png
Normal file
After Width: | Height: | Size: 605 B |
BIN
images/app-icons/tray/today.png
Normal file
After Width: | Height: | Size: 378 B |
BIN
images/app-icons/tray/today@2x.png
Normal file
After Width: | Height: | Size: 667 B |
@ -38,9 +38,7 @@ function getTrayIconPath() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function getIconPath(name: string) {
|
function getIconPath(name: string) {
|
||||||
const size = 16;
|
const suffix = (nativeTheme.shouldUseDarkColors ? "-inverted" : "");
|
||||||
let suffix = (nativeTheme.shouldUseDarkColors ? "-inverted" : "");
|
|
||||||
suffix += `-${size}`;
|
|
||||||
return path.join(path.dirname(fileURLToPath(import.meta.url)), "../..", "images", "app-icons", "tray", `${name}${suffix}.png`);
|
return path.join(path.dirname(fileURLToPath(import.meta.url)), "../..", "images", "app-icons", "tray", `${name}${suffix}.png`);
|
||||||
}
|
}
|
||||||
|
|
||||||
|