mirror of
https://github.com/scratchfoundation/scratch-link.git
synced 2024-11-15 03:15:04 -05:00
fix(Win): fix larger icon sizes being ignored sometimes
This commit is contained in:
parent
e0e96c23e7
commit
e79252f2dd
4 changed files with 5 additions and 3 deletions
4
Makefile
4
Makefile
|
@ -124,8 +124,8 @@ $(eval $(call svg2png,Scratch\ Link\ Safari\ Helper/Scratch\ Link\ Safari\ Exten
|
|||
# See also:
|
||||
# https://stackoverflow.com/q/3236115
|
||||
# https://iconhandbook.co.uk/reference/chart/windows/
|
||||
$(eval $(call svg2ico,scratch-link-win/scratch-link.ico,Assets/square.svg,16 24 32 48 64 96 128 256 512))
|
||||
$(eval $(call svg2ico,scratch-link-win/scratch-link-tray.ico,Assets/simplified.svg,16 24 32 48 64 96 128 256 512))
|
||||
$(eval $(call svg2ico,scratch-link-win/scratch-link.ico,Assets/square.svg,256 128 96 64 48 32 24 16))
|
||||
$(eval $(call svg2ico,scratch-link-win/scratch-link-tray.ico,Assets/simplified.svg,256 128 96 64 48 32 24 16))
|
||||
|
||||
# Windows MSIX
|
||||
# TODO: does Microsoft really want DPI=72 for all of these?
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 161 KiB After Width: | Height: | Size: 139 KiB |
Binary file not shown.
Before Width: | Height: | Size: 163 KiB After Width: | Height: | Size: 140 KiB |
|
@ -10,6 +10,8 @@ usage () {
|
|||
echo " The resulting PNG is optimized using optipng"
|
||||
echo "ICO conversion:"
|
||||
echo " Assumes each desired size is square"
|
||||
echo " Sizes above 256 may not be supported"
|
||||
echo " List sizes in decreasing order to make sure the largest suitable icon size is used in every context"
|
||||
echo " Repeats PNG conversion once per desired size, then glues the results together into an ICO file"
|
||||
echo " PNG optimizations are performed in parallel so progress reporting will likely be garbled"
|
||||
}
|
||||
|
@ -45,7 +47,7 @@ svg2ico () {
|
|||
OUTPUT_ICO="$1"
|
||||
shift
|
||||
SVG2ICO_TMP=$(mktemp -d -t svg2ico-XXXXXXXXXX)
|
||||
trap 'echo "Cleaning up..." >&2; rm -rv "${SVG2ICO_TMP}"; exit' ERR EXIT HUP INT TERM
|
||||
trap 'echo "Cleaning up..." >&2; rm -rv "${SVG2ICO_TMP}"; exit' EXIT HUP INT TERM
|
||||
ICO_PNGS=()
|
||||
for SIZE in "$@"; do
|
||||
ICO_PNG="${SVG2ICO_TMP}/icon-${SIZE}.png"
|
||||
|
|
Loading…
Reference in a new issue