[MacOS] Fix width/height of Images created via ImageGcDrawer #1751
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.
The current implementation of the Image constructor accepting an ImageGcDrawer does initialize the image with the given width and height but extracts them from the image data being initialized with the ImageGcDrawer. This does not take the current device zoom into account properly, leading to images unexpectedly being rendered for 100% scaling while they are supposed to be used at 200% scaling.
With this change, images are properly initialized with the given width and height and using the according device zoom for the image data generation, leading to a sharp initialization also on 200% monitors.
Serves as a fix for the MacOS part of issue eclipse-platform/eclipse.platform.ui#2740
Before fix
linenumberruler_macos_before.mov
After fix
linenumberruler_macos_after.mov