doorstop icon indicating copy to clipboard operation
doorstop copied to clipboard

Add Desktop GUI icon for macOS

Open jacebrowning opened this issue 6 years ago • 1 comments

https://github.com/jacebrowning/doorstop/blob/2d7511ab46b40295c0cbe616195ca4de6504f447/doorstop/gui/main.py#L117-L119

See this comment for instructions: https://github.com/jacebrowning/doorstop/pull/290#discussion_r175652899

jacebrowning avatar Mar 20 '18 13:03 jacebrowning

Based on this comment in #290, I made an .icns file using the CreateICNS.src script in this Stack Overflow answer to convert logo-black-white.png to logo-back-white.icns:

IFS='.' read -ra ADDR <<< "$1"
ICONSET=${ADDR[0]}.iconset
mkdir $ICONSET
sips -z 16 16     $1 --out $ICONSET/icon_16x16.png
sips -z 32 32     $1 --out $ICONSET/[email protected]
sips -z 32 32     $1 --out $ICONSET/icon_32x32.png
sips -z 64 64     $1 --out $ICONSET/[email protected]
sips -z 128 128   $1 --out $ICONSET/icon_128x128.png
sips -z 256 256   $1 --out $ICONSET/[email protected]
sips -z 256 256   $1 --out $ICONSET/icon_256x256.png
sips -z 512 512   $1 --out $ICONSET/[email protected]
sips -z 512 512   $1 --out $ICONSET/icon_512x512.png
cp $1 $ICONSET/[email protected]
iconutil -c icns $ICONSET
rm -R $ICONSET

Then in Terminal, enter: source CreateICNS.src . logo-black-white.png

I converted it to Base64, but now I'm having trouble getting the icon to actually show up in the GUI or Dock on macOS.

Here is my commit with my changes so far.

If someone has experience in tkinter on macOS, I could use the help!

Here are two more Stack Overflow references I researched:

Also, maybe macOS needs iconphoto instead of iconbitmap, according to this doc to Tk commands.

JustinW80 avatar Oct 16 '19 01:10 JustinW80