Skip to content

Commit

Permalink
Windows: Update the overlay icon graphics #3105
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
jturcotte committed Jan 12, 2016
1 parent 74b0d2d commit bb5c370
Show file tree
Hide file tree
Showing 23 changed files with 231 additions and 268 deletions.
72 changes: 40 additions & 32 deletions shell_integration/icons/nopadding/SVG/attention.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
75 changes: 39 additions & 36 deletions shell_integration/icons/nopadding/SVG/error.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions shell_integration/icons/nopadding/SVG/generate_windows_ico.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/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
59 changes: 36 additions & 23 deletions shell_integration/icons/nopadding/SVG/ok.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit bb5c370

Please sign in to comment.