[win32] workaround for ImageDataProvider implementation #1569
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.


This commit adds a workaround for ImageDataProvider implementations that instantiate new Images inside the getImageData(zoom) implementation. This image can be instantiated with the wrong zoom in a multi zoom setting as Images still relay on the static zoom value in DPIUtil. This workaround should be replaced by a proper solution.
How to reproduce
You can reproduce the behavior as follows:
Now the icons are scaled incorrectly for the active part stack. As soon as you switch focus to some other application again, the icons will be rescaled correctly.
Important note: This is not a permanent solution for this issue, but (due to being quite late in the current development cycle) meant as workaround for the 2024-12 release. A proper solution will require an API change, which is not possible now. I tried to implement the workaround as least invasive as possible