Opened 12 years ago
Last modified 9 years ago
#36410 reopened enhancement
Qt applications are blurry on MBP Retina
Reported by: | mail.pourri@… | Owned by: | michaelld (Michael Dickens) |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | |
Keywords: | Cc: | ryandesign (Ryan Carsten Schmidt), eborisch (Eric A. Borisch) | |
Port: | qt4-mac |
Description
The applications using Qt (all KDE apps) are not rendering correctly on a MacBookPro with Retina screen. The text is blurry like if it was upsized with a very bad filter.
Change History (18)
comment:1 Changed 12 years ago by mf2k (Frank Schima)
Keywords: | qt kde retina blurry removed |
---|---|
Owner: | changed from macports-tickets@… to michaelld@… |
Port: | qt4-mac added; qt4 removed |
Version: | 2.1.2 |
comment:2 Changed 12 years ago by michaelld (Michael Dickens)
comment:3 Changed 12 years ago by mail.pourri@…
It's the same with the Stellarium binary on their website. So I guess it's a Qt issue that needs sorting on the Digia's side.
comment:4 Changed 12 years ago by michaelld (Michael Dickens)
Resolution: | → invalid |
---|---|
Status: | new → closed |
OK; thanks for reporting back. I'd recommend you heading to Digia's website, searching for a ticket about this issue, and if you can't find one then opening one. I'm closing this ticket as "invalid" since it's beyond my scope as a MacPorts developer.
comment:5 Changed 12 years ago by nils.carlson@…
Resolution: | invalid |
---|---|
Status: | closed → reopened |
This can in fact be fixed (mostly, not icons and stuff) on the macports side. I did it on my wifes macbook pro after a bunch of reading on digia's webpage. The problem is that the .app Info.plist must contain the following lines under the <dict> tag:
<key>NSPrincipalClass</key> <string>NSApplication</string> <key>NSHighResolutionCapable</key> <true/>
It is possible to add these in an existing .app dir and then make a copy (triggering mac os to do some caching I'm guessing) in order to fix these. I fixed it for spyder by opening the /opt/local/Library/Frameworks/Python.framework/Versions/2.7/Resources/Python.app/Contents/Info.plist, adding the lintes
like so (a little context included):
<dict>(context) <key>NSPrincipalClass</key> <string>NSApplication</string> <key>NSHighResolutionCapable</key> <true/> <key>CFBundleDevelopmentRegion</key>(context)
making a copy (in the finder by dragging, don't know if cp -r will work) and then renaming the original to python.app to python.app.old in the finder and renaming the copy to python.app . Starting spyder (a pyqt application) from the terminal now launches it in high-res.
So just fix all the Info.plist's and this will fix most things...
A link to the relevant discussions on the qt-project: https://bugreports.qt-project.org/browse/QTBUG-23870
comment:6 follow-ups: 7 8 Changed 12 years ago by michaelld (Michael Dickens)
Thanks for the info. As I do not have a retina Mac, I really cannot test any change I make. And, reviewing that bug report it seems that they are not yet in agreement as to what change(s) to make, not exactly. So, I'm going to wait until they fix it and then I can pop in a temporary patch to qt4-mac using their changes. I try to track Qt fixes, but if i miss it please post here that the ticket was fixed.
comment:7 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Cc: | ryandesign@… added |
---|
Replying to michaelld@…:
As I do not have a retina Mac, I really cannot test any change I make.
I can test Retina display patches if you need me to.
comment:8 Changed 12 years ago by nils.carlson@…
Replying to michaelld@…:
Thanks for the info. As I do not have a retina Mac, I really cannot test any change I make. And, reviewing that bug report it seems that they are not yet in agreement as to what change(s) to make, not exactly. So, I'm going to wait until they fix it and then I can pop in a temporary patch to qt4-mac using their changes. I try to track Qt fixes, but if i miss it please post here that the ticket was fixed.
Well, qt can fix the qt apps, but the python.app itself also needs the fix as this in turn can launch pyqt programs. I can see if I can try to create a patch, don't have much time though.
comment:13 Changed 12 years ago by michaelld (Michael Dickens)
I was just forced to get a new Mac, and chose a retina one. Looking at the latest Qt4 install I see no issues with the .app's that Qt installs. Even without the <dict> their icons are very nice and smooth. Python's .app's are chunky in comparison; so, I think Qt4 is doing the right thing (even without me doing anything beyond updating it). I have not made it to installing any KDE apps to see how they look; I do not use KDE and no longer help maintain those ports. Can someone else verify all of this? Is this ticket still valid? I see that the Qt folks still haven't decided what to do.
comment:14 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
It seems to vary by application. Tiled, for example, is Retina-enabled, but QupZilla isn't.
comment:15 Changed 12 years ago by michaelld (Michael Dickens)
Do you think this a qt4-mac specific issue then?
comment:16 Changed 12 years ago by ryandesign (Ryan Carsten Schmidt)
Based on just those two ports, it looks like developers need to put NSHighResolutionCapable into their Info.plist, as discussed above. I don't know if we should try to fix this for all qt4-mac-using ports in the qt4 portgroup. For all we know there might be an app that doesn't work right in Retina mode. Perhaps we should leave it up to each individual app to add that key if appropriate.
comment:17 Changed 12 years ago by michaelld (Michael Dickens)
Tiled's Info.plist contains the "NSHighResolutionCapable" key; this file is actually part of the source (not generated by QMake or elsewhere). I don't like its icon, but it is high-res and all glossy and such. I don't find this key in the standard Qt4 .apps, but they are clearly high-res too. Looking around qt4-mac's install, QtCore provides a template Info.plist; it does not contain this key. Maybe Qt4 is doing something internally now? Anyway, given the sampling of 2 ports handling things differently, I think that it really is up to each port itself to do this setting or handle it internally. I don't think me changing QtCore's Info.plist will help much, if at all.
comment:18 Changed 10 years ago by papp.gergely@…
Hi! After upgrading to macports 2.3.1 retina stopped working for my QT4 apps, most annoyingly for Kile. I tried piecewise reinstallation of components (kde4-kile, qt4-mac, kde4libs etc) with no luck. My Info.plist contains the necessary extra lines and it was working fine for almost a year. Only now it stopped. I tried google but haven't found a similar problem emerge anywhere. Any ideas? (MacBookPro11,3 running Mac OS 10.9.4)
comment:19 Changed 10 years ago by RJVB (René Bertin)
Would it make any difference when Qt is built with the +raster variant?
comment:20 Changed 9 years ago by diver@…
Still an issue with Qt 4.8.7 / KDE 4.14.3 even after applying <dict> tag to KolourPaint's Info.plist at /Applications/MacPorts/KDE4/kolourpaint.app/Contents/Info.plist . Anything else I could try?
comment:21 Changed 9 years ago by Equidamoid
My Kile finally looks fine with that two lines in Info.plist
and --graphicssystem native
arguments. Both raster
and opengl
failed.
PS: I'm ready to help the developers to finally fix this stuff. Feel free to contact me if you need some testing or debugging.
OK ... is this also the case with other ports that use qt4-mac for graphics, such as stellarium? What I'm wondering is whether this is a Qt4.8 issue, and thus their problem, or something specific to qt4-mac and this my problem. stellarium is a good example, because you can download a pre-compiled binary for it from their website (which uses the Qt project's pre-compiled libraries), or you can install it from source in MacPorts which uses qt4-mac. If both of these perform the same, then my vote is that it is a Qt4.8 issue; if they are different, well, that's another issue. Or, is it KDE specific maybe?