New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use application icon for IDLE #64605
Comments
Currently IDLE use default Tk icon. The proposed patch sets special application icon for IDLE. |
There are two icon issues. First is the window icon at the left of the title bar of Idle windows. By the name 'wm_iconphote', I presume this is what this issue is about. Until recently, it *was* the red 'Tk' that is generally used for Tk windows. It is slightly different from idlelib/Icons/tk.gif so it must be in the tk code. For 3.4.0, since the change to tcl/tk 8.6, there are two changes. First the Tk icon is changed to a nearly vertical blue feather. Second, when displayed on the window title bar (as opposed to the Windows taskbar popup listing application windows), it is no longer displayed on the title bar directly but is placed in a square brown background with a white outline. It is atrociously ugly. The same is used for other Tk windows. (On the Windows taskbar popup window listing app windows, only the feather itself appears on the overall light blue background.) So I agree that we need to explicitly set the window title bar icon. I tried the snake (python.gif) and like it better than the feather. It appears on a black square with no outline. Unlike the feather, the same is true on the taskbar popup. Perhaps the background is created by Windows after analyzing the colors in the icon. Visually, it is not much better than the red Tk, but I definitely think we should have a consistent Idle icon. That particular snake is not the current Python logo and it is not Idle specific. Most apps (on Windows at least) use a miniture version of the app icon for the title bar icon. PC/py.ico is close to the Idle icon (see below) but is suffers when converted to py.gif (which I will attach in another message). The attached idle.gif is a cleaned up version of py.gif. It might be tweaked slightly. Or it might be redrawn from the console title bar icon, but I did not find the latter in the repository. In any case, I think we should add an idle.gif and use it in all versions. Otherwise, the patch looks good. (The other .gifs are used in TreeWidget. Idle.icns is an Apple icon collection format, though I do not know if it is actually used.) The other icon issue is the desktop and (on Windows at least) taskbar icon. Currently, when I first install Idle with the Windows installer, it uses the black console icon with Python icon in the lower right. After rebooting, it switches to a white spiral binder page with Python logo on the lower right. This seems to be specific to Idle and is appropriate as it represent the white Idle shell versus the black console. Once upon a time, Idle used this 'idle icon' when first installed, but something changed a few versions ago. There is another issue about this regression on the tracker. |
For comparison. |
We can steal icon from http://www.python.org/favicon.ico. It contains three |
As for desctop icon, see also bpo-1353344 and bpo-15869. |
Martin: is the medium 'python logo on white page' icon used in the Start menu in the repository or otherwise accessible? If not, could you upload it? I closed bpo-15869 in favor of bpo-1353344. Tk does not load .ico files (I tried). idle.gif is 16x16 because pc/py.ico is. That seems to be the standard default size for file lists, menus, including context menus, and title bars. On the other hand, I have my system set for larger type and gui objects, so I am better off with 24x24 or downscaled 32x32 icons. (So python_32x32 looks better than the 16x16 version.) I would like to use an 'idle' icon for Idle windows rather than the generic Python icon. I just noticed that there is a smaller 'white page with python logo' used for the Idle entry in the start menu#. It is not just a scaled-down version of the large white-page icon used on the taskbar. It is different from and better than py.ico. I think this is what we should use as menu and title bar icons are usually the same.
|
I think that all icons used in Windows installer are in the repository. All four ico-files in the PC directory contains 7 images: 16, 32 and 48 pixels size and 4-, 8- and 32-bits per pixel. Three of them (except PC/launcher.ico) were added in bpo-1490384. |
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.
|
Yes, the default option of wm_iconbitmap works only on Windows. Does wm_iconbitmap affect taskbar icon and icon used in task switching? Here is a patch which supports also X11 systems. I'm nor sure about Mac. |
Yes, 'works' means displayed for title bar and task switching. Related but separate issue. A TreeWidget used for browsing files uses the old python.gif icon for .py files. I think we should switch to the modern one that you uploaded as python_16x16.gif. Agree? |
Agree. As for 2.7, we can use
In Ubuntu (and perhaps other Linux distributives), just main Python logo (as |
New changeset bda1739215b4 by Terry Jan Reedy in branch '3.3': New changeset 3aa6fd1dc2c9 by Terry Jan Reedy in branch 'default': |
For 2.7, this substitution |
Yes, it works right on Linux. |
New changeset d4f9efd4be7d by Terry Jan Reedy in branch '2.7': |
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: