mirror of
https://github.com/nextcloud/desktop.git
synced 2024-12-15 02:01:38 +03:00
bb5c370575
The bug seems to be in Windows when it upscales an smaller icon for HiDPI displays. It works fine if we provide a 256x256 size in the ico files. Use the new square icons also used on OS X that removes the share badge and instead has a share icon only for the OK state. This means that we can also remove 3 icons and release 3 slots in the registry for overlay icons (only the first few are actually loaded by explorer). This also adds a script that uses ImageMagick to convert our SVG icons to Windows ico files. Since ImageMagick seems to have issue doing proper antialiasing with pixels on the edge of icons, this also slightly scale the icons to leave 2px on each edge, out of its logical 128px width.
8 lines
1.5 KiB
Bash
Executable file
8 lines
1.5 KiB
Bash
Executable file
#!/bin/sh
|
|
|
|
# Dimensions taken from https://www.apriorit.com/dev-blog/357-shell-extentions-basics-samples-common-problems#_Toc408244375
|
|
convert -background transparent attention.svg -gravity SouthWest \( -clone 0 -resize 10x10 -extent 16x16 \) \( -clone 0 -resize 16x16 -extent 32x32 \) \( -clone 0 -resize 24x24 -extent 48x48 \) \( -clone 0 -resize 128x128 -extent 256x256 \) -delete 0 ../../../windows/OCOverlays/ico/Warning.ico
|
|
convert -background transparent error.svg -gravity SouthWest \( -clone 0 -resize 10x10 -extent 16x16 \) \( -clone 0 -resize 16x16 -extent 32x32 \) \( -clone 0 -resize 24x24 -extent 48x48 \) \( -clone 0 -resize 128x128 -extent 256x256 \) -delete 0 ../../../windows/OCOverlays/ico/Error.ico
|
|
convert -background transparent ok.svg -gravity SouthWest \( -clone 0 -resize 10x10 -extent 16x16 \) \( -clone 0 -resize 16x16 -extent 32x32 \) \( -clone 0 -resize 24x24 -extent 48x48 \) \( -clone 0 -resize 128x128 -extent 256x256 \) -delete 0 ../../../windows/OCOverlays/ico/OK.ico
|
|
convert -background transparent shared.svg -gravity SouthWest \( -clone 0 -resize 10x10 -extent 16x16 \) \( -clone 0 -resize 16x16 -extent 32x32 \) \( -clone 0 -resize 24x24 -extent 48x48 \) \( -clone 0 -resize 128x128 -extent 256x256 \) -delete 0 ../../../windows/OCOverlays/ico/OK_Shared.ico
|
|
convert -background transparent sync.svg -gravity SouthWest \( -clone 0 -resize 10x10 -extent 16x16 \) \( -clone 0 -resize 16x16 -extent 32x32 \) \( -clone 0 -resize 24x24 -extent 48x48 \) \( -clone 0 -resize 128x128 -extent 256x256 \) -delete 0 ../../../windows/OCOverlays/ico/Sync.ico
|