-
Notifications
You must be signed in to change notification settings - Fork 185
Add zoom level support for program image data #409
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
Conversation
|
There is no gtk implementation. |
|
Changes look good for Windows and Mac. On Linux, the zoom passed in the new API is not used, so behavior is same as Program.getImageData(). I'm unable to test on Linux, so not sure if the Program.getImageData() already returns ImageData based on the system scaling. If that's the case, I think we can merge the change as Program.getImageData(zoom) is working as expected. Behavior of Program.getImageData() would be different compared to other platforms, but that would be a different issue. @akurtakov Can you please verify the behavior of Program.getImageData on Linux? |
@ptief targeting this for 4.27M1. From the code looks like no changes are required for Linux, but I couldn't confirm it. If required let's track it in a separate issue. |
6c52bfd to
c909b05
Compare
c909b05 to
9a1891b
Compare
|
I've verified this with SWT and Platform UI patches on Mac and it fixes the issue. |
|
@ptief @lshanmug Observation 1 ::
Observation 2 :: |
|
Please retarget this for the appropriate milestone in 4.28. |
|
I have pushed a slight adaptation in c5998de. The program icons delivered by Windows are scaled according to the scale factor of the primary monitor. This is different from other images that are loaded in their original scaling. This has to be represented in zoom factor passed to the |
c5998de to
c20e5a0
Compare
|
@deepika-u could you please check whether your concerns in #409 (comment) have been addressed with the recent changes? The icons should now be sized correctly and visible completely, no matter which scale factor. Regarding your question concerning usage of Since recent changes did only affect the Windows implementation, there is no need to re-verify the effects on Mac. |
|
Thanks alot for driving this pr in.
Please find my observations at 100%, 125%, 150%, 175%, 200% as below Without any pr -> With 409 pr alone, the images are not clear as you said -> With both prs 409 and eclipse-platform/eclipse.platform.ui#295 applied, images are PRETTY clear and complete -> So along with this pr expecting eclipse-platform/eclipse.platform.ui#295 to be merged ASAP. Thanks once again. Least but not last i have a small observation here in the last image when both pr 409 and pr 295 applied case => |
|
Thanks a lot for that detailed verification, @deepika-u!
That's a nice observation. Unfortunately, that is something we cannot change. The reason is the following: When retrieving an icon via the Windows API, it returns that icon scaled according to the primary monitor scaling, so in your example in 100% (16x16 px), 125% (20x20 px), 150% (24x24 px) and so on. SWT is currently configured to only use 100% and 200% images (due to |
|
I'm really impressed not only by the work here but also by the collaborative teamwork! |
HeikoKlare
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
eclipse-platform/eclipse.platform.ui#295 should be merged right afterwards.
Signed-off-by: Patrick Tief <[email protected]>
When loading icons for programs, their image data will be scaled according to the primary monitor scaling. This is different from other images, which when loaded have their original size. This change reflects that behavior when creating the image data for a target zoom factor by considering the icon's pre-scaling. It also add a @SInCE tag for the previously introduced zoom-aware getImageData() method for the Program class.
5795571 to
19145ae
Compare





Add zoom level support for Program image data.