Skip to content
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

Support for retina displays (HiDPI) #19434

Closed
qgib opened this issue Aug 26, 2014 · 22 comments
Closed

Support for retina displays (HiDPI) #19434

qgib opened this issue Aug 26, 2014 · 22 comments
Labels
Build/Install Related to compiling or installing QGIS Feature Request

Comments

@qgib
Copy link
Contributor

qgib commented Aug 26, 2014

Author Name: Joshua Arnott (@snorfalorpagus)
Original Redmine Issue: 11103

Redmine category:mac_os_specific


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



Related issue(s): #19631 (relates), #20619 (duplicates), #20691 (relates), #20778 (relates), #21516 (relates), #21517 (relates), #21542 (relates), #21543 (relates), #22448 (relates), #22449 (relates), #22450 (relates), #22451 (relates), #22452 (relates), #24365 (relates)
Redmine related issue(s): 11337, 12469, 12549, 12671, 13469, 13470, 13497, 13498, 14470, 14471, 14472, 14473, 14474, 16456


@qgib
Copy link
Contributor Author

qgib commented Aug 26, 2014

Author Name: Pierre-Luc Auclair (Pierre-Luc Auclair)


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

@qgib
Copy link
Contributor Author

qgib commented Aug 27, 2014

Author Name: Joshua Arnott (@snorfalorpagus)


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)

@qgib
Copy link
Contributor Author

qgib commented Nov 19, 2014

Author Name: Joshua Arnott (@snorfalorpagus)


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: #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?)?

@qgib
Copy link
Contributor Author

qgib commented Dec 8, 2014

Author Name: Giovanni Manghi (@gioman)


duplicate of #19631


  • status_id was changed from Open to Closed
  • resolution was changed from to duplicate

@qgib
Copy link
Contributor Author

qgib commented Dec 8, 2014

Author Name: Joshua Arnott (@snorfalorpagus)


Please reopen this issue. It is not a duplicate. #19631 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

@qgib
Copy link
Contributor Author

qgib commented Jan 23, 2015

Author Name: Michael Kirk (@michaelkirk)


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

Can you confirm Giovanni?

@qgib
Copy link
Contributor Author

qgib commented Jan 25, 2015

Author Name: Giovanni Manghi (@gioman)


  • resolution was changed from duplicate to
  • status_id was changed from Closed to Open

@qgib
Copy link
Contributor Author

qgib commented Jan 28, 2015

Author Name: Michael Kirk (@michaelkirk)


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

@qgib
Copy link
Contributor Author

qgib commented Aug 20, 2015

Author Name: Anita Graser (@anitagraser)


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


  • 9011 was configured as pluginmanager.png

@qgib
Copy link
Contributor Author

qgib commented Sep 21, 2015

Author Name: Anita Graser (@anitagraser)


  • assigned_to_id was configured as Alessandro Pasotti

@qgib
Copy link
Contributor Author

qgib commented Nov 2, 2015

Author Name: Michael Kirk (@michaelkirk)


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


  • 9256 was configured as Screen_Shot_2015-11-02_at_2.27.32_PM.png

@qgib
Copy link
Contributor Author

qgib commented Nov 7, 2015

Author Name: Alessandro Pasotti (@elpaso)


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


  • status_id was changed from Open to In Progress

@qgib
Copy link
Contributor Author

qgib commented Mar 12, 2016

Author Name: Brendan Heberlein (Brendan Heberlein)


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!

@qgib
Copy link
Contributor Author

qgib commented Mar 12, 2016

Author Name: Alessandro Pasotti (@elpaso)


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


  • assigned_to_id removed Alessandro Pasotti

@qgib
Copy link
Contributor Author

qgib commented Mar 13, 2016

Author Name: Anita Graser (@anitagraser)


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.

@qgib
Copy link
Contributor Author

qgib commented Oct 1, 2016

Author Name: Anita Graser (@anitagraser)


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

@qgib
Copy link
Contributor Author

qgib commented Dec 16, 2016

Author Name: chris Mr (@chrismarx)


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-

@qgib
Copy link
Contributor Author

qgib commented Dec 16, 2016

Author Name: Nyall Dawson (@nyalldawson)


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.

@qgib
Copy link
Contributor Author

qgib commented Apr 30, 2017

Author Name: Giovanni Manghi (@gioman)


  • easy_fix was configured as 0

@qgib
Copy link
Contributor Author

qgib commented Nov 9, 2017

Author Name: Michal Jurewicz (Michal Jurewicz)


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


  • 11665 was configured as QGIS2 Linux Mint.png
  • 11663 was configured as QGIS3 MacOS 2.png
  • 11661 was configured as QGIS3 MacOS.png
  • 11662 was configured as QGIS2 Linux Mint 2.png
  • 11664 was configured as QGIS3 MacOS 3.png

@qgib
Copy link
Contributor Author

qgib commented Sep 13, 2018

Author Name: Denis Rouzaud (@3nids)


  • description was changed from 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:

NSPrincipalClass
NSApplication
NSHighResolutionCapable
True

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 to 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:

NSPrincipalClass
NSApplication
NSHighResolutionCapable
True

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

  • category_id was changed from GUI to mac_os_specific

@qgib
Copy link
Contributor Author

qgib commented Oct 19, 2018

Author Name: Denis Rouzaud (@3nids)


fixed in master, to be released in 3.4
#8242
Youhou!


  • status_id was changed from In Progress to Closed
  • resolution was changed from to fixed/implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Build/Install Related to compiling or installing QGIS Feature Request
Projects
None yet
Development

No branches or pull requests

1 participant