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

Enable automatic high DPI scaling and fix incorrect map scale calculation #52972

Merged
merged 10 commits into from
May 11, 2023
Merged

Conversation

jbp35
Copy link
Contributor

@jbp35 jbp35 commented May 2, 2023

This PR enables automatic high DPI scaling which is not set by default in QT5. As this is not currently enabled, QGIS uses the default DPR of 1 on all devices (except if a custom environment variable is set at the OS level). This causes multiple UI scaling issues on high DPI screens.

Fixes (tested):
#49764

Possibly also fixes:
#40274
#52643
#25669
#25673
#52291

@github-actions github-actions bot added this to the 3.32.0 milestone May 2, 2023
@nyalldawson nyalldawson reopened this May 10, 2023
@nirvn
Copy link
Contributor

nirvn commented May 11, 2023

For the record, +1 to merge this; we should do it as soon as possible so it can be thoroughly tested prior to releasing 3.32.

@nyalldawson
Copy link
Collaborator

I've tested this, and while there's some regressions the end result is considerable better then the current state.

Regressions I've spotted:

  • marker symbol rendering is pixelated in canvas and in symbol preview widgets
  • color ramp legend items are oversized
  • symbol preview icons in the style manager are pixelated

We also need to check if the default icon size calculation for new installs is still appropriate, or whether this should be hardcoded to 24 pixels now.

@nyalldawson nyalldawson merged commit 2dd6beb into qgis:master May 11, 2023
@jbp35
Copy link
Contributor Author

jbp35 commented May 11, 2023

I've tested this, and while there's some regressions the end result is considerable better then the current state.

Regressions I've spotted:

  • marker symbol rendering is pixelated in canvas and in symbol preview widgets
  • color ramp legend items are oversized
  • symbol preview icons in the style manager are pixelated

We also need to check if the default icon size calculation for new installs is still appropriate, or whether this should be hardcoded to 24 pixels now.

Thank you for looking into this! I am facing the same regressions but have not yet been able to figure out what's causing these issues.
Regarding hard-coding the toolbar icon size, I think this is a better approach since the current code only considers the primary display when guessing the best icon size . I assume this could cause issues with dual displays having different DPR. I tried to hard-code, and it works fine in my environment. here is a follow-up PR with the changes :
#53077

@jbp35
Copy link
Contributor Author

jbp35 commented May 11, 2023

Other potential regressions spotted:

  • Color picker is pixelated in layer panel context menu and in layer properties
  • WMS layer looks blurry on high DPI screen
  • the icon to maximize and close panels (such as layer panel) is pixelated on windows

@jbp35
Copy link
Contributor Author

jbp35 commented May 30, 2023

@nyalldawson Probably another one to fix: the 3D Map view looks blurry and could probably get some attention.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants