Feature request #11103
Support for retina displays (HiDPI)
|Pull Request or Patch supplied:||No||Resolution:|
Currently QGIS does not support Retina displays (HiDPI), such as on the current MacBook Pro. The application loads, but is running in a low-resolution upscaled mode which makes everything look pixelated. See attached screenshot (qgis_lowdpi.png).
The Qt blog has some information on supporting retina displays in Qt applications:
The first step is to add the following to the Info.plist file:
<key>NSPrincipalClass</key> <string>NSApplication</string> <key>NSHighResolutionCapable</key> <string>True</string>
This tells the application that it's capable of HiDPI rendering, which gets text and buttons to render correctly. See attached screenshot (qgis_hidpi.png).
However, the map canvas itself, and (most) of the icons are still pixelated. To "fix" the icons, they need hi resolution versions available. The blog post discusses this a little, but I've not had any success so far in getting QGIS to recognise larger versions of the icons. The other step will be to tell the canvas to renderer at a higher DPI - no idea how to get this working.
I've asked a question on stack overflow here:
Myself (@snorfalorpagus) and Dale Kunce (@calimapnerd) have an interest getting this working:
#2 Updated by Joshua Arnott about 4 years ago
It looks like the backport that adds support for the hidpi pixmaps (required for nice looking icons) hasn't made it into the release branch yet. https://codereview.qt-project.org/#/c/54636/
On top of this, I can't get it to compile:
Undefined symbols for architecture x86_64: "qt_mac_get_scalefactor()", referenced from: QPixmap::grabWindow(long, int, int, int, int) in qpixmap_mac.o QToolButton::sizeHint() const in qtoolbutton.o ld: symbol(s) not found for architecture x86_64 clang: error: linker command failed with exit code 1 (use -v to see invocation)
#3 Updated by Joshua Arnott almost 4 years ago
There is a pull request to add Qt5 support to QGIS. This is hopefully a set in the right direction for the high DPI icons: https://github.com/qgis/QGIS/pull/1676
I've been trying to get the map canvas to render at 2x DPI. It seems it should be possible, with some tweaks to qgsmapcanvas.cpp, qgsmapsettings.cpp and qgsmaptopixel.cpp. I managed to get the map to render "pretty" (i.e at the native DPI), but not in the right place. The scale, etc. becomes confused.
Perhaps someone with a better understanding of how the renderer works could weigh in (Martin or Jürgen?)?
#5 Updated by Joshua Arnott almost 4 years ago
Please reopen this issue. It is not a duplicate. #11337 is one of several issues related to overall compatibility with high resolution displays. For this to be resolved there also needs to be:
- Fixes to the map canvas so that it renders at the correct resolution
- Updates to icons so that they don't look pixelated/terrible
- Changes to the Info.plist file (as mentioned in the original post) for OS X
#11 Updated by Michael Kirk almost 3 years ago
- File Screen_Shot_2015-11-02_at_2.27.32_PM.png added
@Anita Graser - Either I don't understand your comment about the plugin description not scaling, or I just cant reproduce it on Mac/master.
See my screenshot of the "unscaled" running alongside the scaled.
Granted the buttons/checkboxes are the wrong sizes, but the text seems good.
#13 Updated by Brendan Heberlein over 2 years ago
Checking in to affirm interest & hopefully get some updates on the status of the project.
I hope you all are aware that the entire icon set for QGIS exists in SVG format already and there is no need to make new one for HDPI. You can find them here: https://github.com/qgis/QGIS/tree/master/images/themes/default
I am super interested in getting this going because I love my retina display but I hate the pixelated look QGIS now has. Now that I have switched to a higher resolution screen, QGIS effectively runs at a lower resolution(!) Go figure.
I am no code monkey but I'm learning python and happy to do anything I can to help. I don't want to wait for QGIS 3.0!
#18 Updated by Nyall Dawson almost 2 years ago
Chris - this bug tracker doesn't work on votes. See http://nyalldawson.net/2016/08/how-to-effectively-get-things-changed-in-qgis/ for a description on how things get prioritised.
#20 Updated by Michal Jurewicz 11 months ago
- File QGIS2 Linux Mint.png added
- File QGIS3 MacOS 2.png added
- File QGIS3 MacOS.png added
- File QGIS2 Linux Mint 2.png added
- File QGIS3 MacOS 3.png added
I would like to report that the problem is still here on MacOS, even on new QGIS3 (master build made by homebrew formula). Text, icons and etc. is very nice. However output on canvas is still pixelated on OSX. However when I open QGIS 2.18.12 on Linux Mint virtualised on my iMac 5k, even old QGIS2 look great on Retina (however I had to change icon size on settings). I send you screenshots below.
It would be nice to had proper retina support for MacOS