[issue32129] Icon on macOS
Terry J. Reedy
report at bugs.python.org
Sat Nov 25 02:28:57 EST 2017
Terry J. Reedy <tjreedy at udel.edu> added the comment:
Here is the current code in idlelib.pyshell.main.
# set application icon
icondir = os.path.join(os.path.dirname(__file__), 'Icons')
if system() == 'Windows':
iconfile = os.path.join(icondir, 'idle.ico')
root.wm_iconbitmap(default=iconfile)
else:
ext = '.png' if TkVersion >= 8.6 else '.gif'
iconfiles = [os.path.join(icondir, 'idle_%d%s' % (size, ext))
for size in (16, 32, 48)]
icons = [PhotoImage(master=root, file=iconfile)
for iconfile in iconfiles]
root.wm_iconphoto(True, *icons)
IDLE uses wm_iconbitmap on Windows and wm_iconphoto with PhotoImages from .gif or .png on everything else. It appears that wm_iconphoto is already used on macOS with tk 8.5.
The uploaded PM.png looks like it might be idle16.png zoomed out at least 3x. Anything that does that instead of using the much sharper 32 or 48 bit versions is, to me, buggy. The bigger images stay much sharper even when zoomed.
----------
nosy: +ned.deily
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue32129>
_______________________________________
More information about the Python-bugs-list
mailing list