Terry J. Reedy added the comment:

I see. MS Paint just pulled out one of the 16-pixel images. Photoshop (like Tk) 
refused to open the file. However, I found the following:

iconbitmap = wm_iconbitmap(self, bitmap=None, default=None)
    Set bitmap for the iconified widget to BITMAP. Return
    the bitmap if None is given.
     
    Under Windows, the DEFAULT parameter can be used to set the icon
    for the widget and any descendents that don't have an icon set
    explicitly.  DEFAULT can be the relative path to a .ico file
    (example: root.iconbitmap(default='myicon.ico') ).

This works* with default=<py.ico> for Windows and is available in 2.7, while 
wm_iconphoto is not. I think we should use it for Windows. (I get the 
impression from the help text that default= only works for Windows, but I 
cannot test this.) See uploaded 3.4 patch. I plan to apply this before the next 
release.

Someone else will have to add tested elif: clauses for other systems. For X, 
iconphoto might be better, as it accepts multiple bitmaps (of various sizes) 
and packages them for X. Images could be extracted from py.ico for this 
purpose. Or maybe just the 32-bit 32 pixel image in py.ico, save as the best 
quality .gif, would be enough. Iconphoto help says it does not work for Macs; 
the iconbitmap help says nothing, so maybe it does.

* The title icon I see is better than than the 16 pixel gif extracted from 
py.ico, so I presume it is downsized from a 32 pixel version. Unlike any .gif, 
transparency is handled correctly. However, Tk somehow distorts the colors and 
it is much darker than the same-size Start menu icon. For the white page part, 
I like the darker outline and page holes.better. For the two snakes, it is much 
worse. The bright yellow-orange snake is instead a dull brownish orange and not 
properly recognizable as the Python snake. I renamed py.ico to idle.ico so 
someone could edit the colors to look better when run through Tk without having 
to rename the file and change the code later. (I would want to rename after 
editing so no one would think it identical to PC/py.ico.)  But I do not think a 
commit should wait on an image edit.

----------
stage: patch review -> commit review
Added file: http://bugs.python.org/file33820/20406-34.diff

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue20406>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to