-
-
Notifications
You must be signed in to change notification settings - Fork 7.8k
Use HiDPI icons for PyQt5 #5057
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
Conversation
e9ccf4d
to
478c49f
Compare
478c49f
to
1a755dd
Compare
I've found a way to figure out whether we need to use the HiDPI icons (i.e. what the screen resolution is). I'll work on it later this week. |
It looks like qt understands svg, could we use those instead of hi-res pngs? http://doc.qt.io/qt-5/qimagereader.html#supportedImageFormats |
@tacaswell - ah, certainly! I had not realized that. I will work on that in a few days. |
@tacaswell - although it looks like this was actually changed from SVG to PNG in the past for Qt4: Sounds like this caused some issues on Windows? This was 4 years ago though, so maybe things have changed? |
@tacaswell - how do you think we should proceed on this? Is there anyone else who might be able to advise on what to do here re: PNG vs SVG? |
I am not sure, I know @jrevans has recently done a lot of work porting a Qt app over to Qt5, he might have some insight here (not sure what platform they run on). |
@tacaswell I've not used py2exe before. But from the mailing list link it looks like the change to PNG was more due to a packaging issue (i.e. py2exe wasn't bundling the required xml handler). I have a Windows machine available I can test this on. On Qt5 Svg I think rendering is handled by a separate Qt.Svg module so I suspect there will be the same problem, but with a different fix. There are also the image format plugins that may need to be triggered. Making this work may just be a case of including the Svg/other import in our |
We are adding more files to I really don't like the hand adding of icons of different sizes and hand naming is even worst. Why don't we use a script to convert the source With an automatic icon creation, we are sure the size that we are requesting in the format that we are requesting will be there. |
Just FYI: I'm working on this. |
I think this is now fixed in master? (with the new icons) |
Confirming that Qt5Agg and the OSX backend have HiDPI icons on HiDPI screens Thanks @astrofrog |
This partially addresses #4978, by adding and using HiDPI PNG icons for the PyQt5 framework.
Before:
After:
Note that I had to adjust the toolbar height and spacing because otherwise it ended up more condensed than before for some reason.
Note: I'm not aware of a reliable way to determine the DPI of a display so at the moment this always uses the HiDPI icons when using PyQt5. It would be great if someone could check that this still looks fine (and no worse than before)