-
Notifications
You must be signed in to change notification settings - Fork 143
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
[Win32] ImageDataProvider: incorrectly reported zoom level #1579
Comments
Can you please explain where this expectation comes from? The behavior should have never been like this. Actually, the behavior of having the device zoom being "rounded" to multiples of 100 is intended as being established several years ago: https://eclipse.dev/eclipse/news/4.6/platform.php#swt-autoscale-tweaks If the application is supposed to scale everything according to the actual native zoom (including images), you should use |
My expectation comes from the fact that numbers like |
Background: until now we were using Is there also a mode where my solely my BTW, how I can request the actual shell's zoom level now? |
I have to admit that I do not understand the actual issue: is there any behavior that has changed? With Lines 651 to 653 in d30571a
Also the image constructor retrieving the image data has always taken this device zoom, if I am not mistaken. So would be interesting to know where the behavior has actually changed in comparison to, e.g., the previous release of Eclipse SWT.
In the
|
|
I've tried our application with the new SWT library with |
What can I do to use our 200% zoom images for a system zoom level of 150%? How can I avoid any auto-scaling for the image datas provided by my |
We were using the |
From my understanding, for a system zoom of 150%, the 200% images will only be used when using
The new monitor-specific scaling should not affect the existing behavior in any way. It is supposed to be an opt-in feature (for now). So if anything works different for you then it did before, there is probably some regression that we missed so far. We actively test |
So SWT always performs auto-scaling for images (e.g. for zoom levels like 150% or 175%) and there is no way to avoid it? |
It depends:
But as said: this is existing behavior of SWT for years, and none of the recent changes should have affected that. |
Describe the bug
An
ImageDataProvider
can be used to provide differentImageData
instances for the passed zoom level. This does not work correctly - the passed zoom level is incorrect. It "snaps" to multiples of 100. For 150% zoom level on Windows 11, I'm getting the value100
, for 175% zoom level I'm getting200
.To Reproduce
Run this snippet on Windows 11 with different monitor zoom levels (I only have one 4k monitor attached):
It will log the reported zoom level.
Expected behavior
For 150% Windows/monitor zoom level, I expect
150
to be reported, for 175% I expect to get175
. Otherwise the image datas I report back are too small for 150% zoom level.Screenshots
For 150% zoom level:
For 175% zoom level:
Environment:
Tried on Windows 11 23H2 with one 32" 4k monitor attached.
Workaround (or) Additional context
Set swt.autoScale to false, but this will cause other problems.
The text was updated successfully, but these errors were encountered: