Feature request #11103

Support for retina displays (HiDPI)

Added by Joshua Arnott about 10 years ago. Updated about 6 years ago.

Status:Closed
Priority:Normal
Assignee:-
Category:mac_os_specific
Pull Request or Patch supplied:No Resolution:fixed/implemented
Easy fix?:No Copied to github as #:19434

Description

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:

http://blog.qt.digia.com/blog/2013/04/25/retina-display-support-for-mac-os-ios-and-x11/

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:

http://stackoverflow.com/questions/25494230/adding-support-for-retina-displays-hidpi-to-an-existing-qt4-application

Myself (@snorfalorpagus) and Dale Kunce ‏(@calimapnerd) have an interest getting this working:

https://twitter.com/calimapnerd/status/381016157920055297

qgis_lowdpi.png (1.01 MB) Joshua Arnott, 2014-08-26 07:24 AM

qgis_hidpi.png (1.22 MB) Joshua Arnott, 2014-08-26 07:24 AM

pluginmanager.png (92.4 KB) Anita Graser, 2015-08-20 12:50 PM

Screen_Shot_2015-11-02_at_2.27.32_PM.png - plugin installer, high res vs. low res (387 KB) Michael Kirk, 2015-11-02 02:29 PM

QGIS3 MacOS.png - QGIS3 on MacOS High Sierra - iMac 5k (325 KB) Michal Jurewicz, 2017-11-09 07:01 AM

QGIS2 Linux Mint 2.png - QGIS2 on Linux Mint virtualised on iMac 5k with High Sierra (34.9 KB) Michal Jurewicz, 2017-11-09 07:01 AM

QGIS3 MacOS 2.png - QGIS3 on MacOS High Sierra - iMac 5k (1.57 MB) Michal Jurewicz, 2017-11-09 07:01 AM

QGIS3 MacOS 3.png - QGIS3 on MacOS High Sierra - iMac 5k (18.2 KB) Michal Jurewicz, 2017-11-09 07:01 AM

QGIS2 Linux Mint.png - QGIS2 on Linux Mint virtualised on iMac 5k with High Sierra (856 KB) Michal Jurewicz, 2017-11-09 07:01 AM


Related issues

Related to QGIS Application - Bug report #11337: Attribute Table does not show correctly on high resolutio... Closed 2014-10-06
Related to QGIS Application - Bug report #12549: QGIS GUI scaling issues on retina display Closed 2015-04-11
Related to QGIS Application - Bug report #12671: Cursor icon is too small on HiDPI screen Closed 2015-04-30
Related to QGIS Application - Bug report #13470: Fix font size in plugin manager on HiDPI displays Closed 2015-09-30
Related to QGIS Application - Bug report #13497: Fix font size on the News tab on HiDPI displays Closed 2015-10-03
Related to QGIS Application - Bug report #13469: Fix font size of recent projects screen on HiDPI displays Closed 2015-09-30
Related to QGIS Application - Bug report #13498: Fix font size in Processing help windows on HiDPI displays Closed 2015-10-03
Related to QGIS Application - Bug report #14470: Pluses in Layer and Browser Panel are too small on HiDPI Closed 2016-03-13
Related to QGIS Application - Bug report #14471: Only some icons in Style Manager scale on HiDPI Closed 2016-03-13
Related to QGIS Application - Bug report #14472: Attribute table icons too small on HiDPI Open 2016-03-13
Related to QGIS Application - Bug report #14473: Formview feature list does not scale on HiDPI Closed 2016-03-13
Related to QGIS Application - Bug report #14474: Processing menu icons don't scale on HiDPI Closed 2016-03-13
Related to QGIS Application - Bug report #16456: Model preview is too small on HiDPI by default Closed 2017-04-20
Duplicated by QGIS Application - Feature request #12469: Retina "support" Closed 2015-03-27

History

#1 Updated by Pierre-Luc Auclair about 10 years ago

I am also highly interested in this.

I might not be able to help with the coding (I'm a web programmer) but can help with testing and creating hi-def ui icons (graphic designer for ~10yrs).

#2 Updated by Joshua Arnott about 10 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 10 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?)?

#4 Updated by Giovanni Manghi almost 10 years ago

  • Status changed from Open to Closed
  • Resolution set to duplicate

duplicate of #11337

#5 Updated by Joshua Arnott almost 10 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

#6 Updated by Michael Kirk almost 10 years ago

I'm concerned that this is still closed as it does not seem to be a duplicate of #11337.

Can you confirm Giovanni?

#7 Updated by Giovanni Manghi almost 10 years ago

  • Resolution deleted (duplicate)
  • Status changed from Closed to Open

#8 Updated by Michael Kirk almost 10 years ago

Joshua - when you made your first attempt at this, did you publish your changes anywhere? Is there a work in progress I could see?

#9 Updated by Anita Graser about 9 years ago

The text area in the Plugin Manager which displays the plugin description doesn't scale with the rest of the UI, see attached screenshot.

#10 Updated by Anita Graser about 9 years ago

  • Assignee set to Alessandro Pasotti

#11 Updated by Michael Kirk about 9 years ago

@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.

#12 Updated by Alessandro Pasotti almost 9 years ago

  • Status changed from Open to In Progress

It might be fixed with 061bdde, can somebody please test and confirm that it works on other screen sizes/operating systems?

#13 Updated by Brendan Heberlein over 8 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!

#14 Updated by Alessandro Pasotti over 8 years ago

  • Assignee deleted (Alessandro Pasotti)

It works fine for me (on Linux), I don't have a mac so I cannot help more, sorry.

#15 Updated by Anita Graser over 8 years ago

Alessandro Pasotti wrote:

It might be fixed with 061bdde, can somebody please test and confirm that it works on other screen sizes/operating systems?

Confirmed, the plugin description in the installer now displays fine.

#16 Updated by Anita Graser about 8 years ago

Correction: The plugin description is ok on hidpi now but too big on regular screens.

#17 Updated by chris Mr almost 8 years ago

Upvoting, I think it's hard for people not on 4k monitors or retina screens to appreciate just how much nicer it is to have everything crisp, and now this is one of the new apps I use that doesn't support the high resolution yet-

#18 Updated by Nyall Dawson almost 8 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.

#19 Updated by Giovanni Manghi over 7 years ago

  • Easy fix? set to No

#20 Updated by Michal Jurewicz almost 7 years ago

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

#21 Updated by Denis Rouzaud about 6 years ago

  • Description updated (diff)
  • Category changed from GUI to mac_os_specific

#22 Updated by Denis Rouzaud about 6 years ago

  • Status changed from In Progress to Closed
  • Resolution set to fixed/implemented

fixed in master, to be released in 3.4
https://github.com/qgis/QGIS/pull/8242
Youhou!

Also available in: Atom PDF