Fix symbol icon size and pixelation issues on hidpi screens - #66530
Merged
Conversation
The screen might not be valid when the widget is first constructed, so we need to make sure we don't store it and instead just always retrieve the actual screen when needing to draw the icons.
…view icon It's not appropriate to assume that we are always updating the preview icon as a result of a user-initiated modification to the symbol.
Instead of assertion we should just NOT use the cache image Otherwise this assert frequently triggers when dragging QGIS between windows with different DPI
Previously we'd draw oversized, pixelated icons for >1 devicePixelRatio
For devices with pixel ratios > 1
nirvn
approved these changes
Jun 26, 2026
nirvn
left a comment
Contributor
There was a problem hiding this comment.
Is any of this screen DPI testable on CI?
Collaborator
Author
|
I don't think so -- you can't manually create QScreen objects with particular properties (it's a qt internal only). I tried previously (in #66531) to see if there were anyway to influence that via Qt environment variables, but those only change how the screens are interpreted, not the properties returned by QScreen... |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Fixes a range of issues where symbol icons are missized and badly rendered on screens with device pixel ratios > 1.
Fixes #55349
AI tool usage