[Win7] app.setIcon() has no effect
jonas-klein opened this issue · comments
It seems, that app.setIcon(path) does not change the icon at the window title bar. Its always the default one, the one from appjar.
My setup:
- Windows 7 64 bit
- Python 3.7.3
- AppJar 0.94.0 (the most current one)
- .png, .gif, both 16x16px, generated by Photoshop CC2018
What I've tried:
- using relative path
- using absolute path
- using absolute path and moved .png to another file location (each of the paths are without spaces or other umlauts)
- moved the line with "setIcon" to another position
Error message i got (the only one):
appJar:WARNING [Line 312->7466/_getImage]: Image processing for .PNGs is slow. .GIF is the recommended format
when i tried to use a .png image.
I call my script via doubleclick.
My code looks more or less like this:
from bluetooth import *
import threading
import time
from threading import Lock
import random
from appJar import gui
import os
import time
import sys
#some code
app = gui("Window title", "500x600", handleArgs=False)
app.setIcon("D:/Desktop/image.png")`
# some appjar controls and styling
app.go()```
I'm aware that app icons don't work on Mac/Linux, but they were working on Windows last time I tried. I'll need to get on a Windows box and have a look into it...
I just tried the same thing, but I'm on windows 10 x64 and used a .ico file, and I was successful in getting the icon to show up.
appJar: 0.94.0 Python: 3.7.6 TCL: 8.6, TK: 8.6 Platform: Windows pid: 2696
locale: en_US
I used a .ico file converted from a png. I did this at https://convertico.com/.
I used the following code:
app.setIcon("padlock.ico")
padlock.ico is in the same directory as my python file.
The png file looks like this:
I converted the png to ico on the above website, it doesn't give me options for size so I used the size that it automatically converted it to.
Running my app I get the icon in the bar:
In my case it is working in Windows. I don't know if it is because I'm in Windows 10, because I used a .ico file, or for some other reason, I don't have a copy of 7 to try with.