Replace nativeZoom of widgets with disabled autoscaling with 100#2599
Merged
Conversation
80868a9 to
ecbd0c0
Compare
Contributor
ShahzaibIbrahim
commented
Oct 7, 2025
10fe424 to
29ded18
Compare
29ded18 to
1f7b045
Compare
fedejeanne
reviewed
Oct 10, 2025
Member
fedejeanne
left a comment
There was a problem hiding this comment.
How does one test this?
Shouldn't line 186 (in the constructor) also be adapted?
this.nativeZoom = parent != null ? parent.nativeZoom : DPIUtil.getNativeDeviceZoom();
HeikoKlare
reviewed
Oct 13, 2025
8332a07 to
d98ea7b
Compare
Contributor
Author
I have added how to test section.
No, you can only disable autoscaling after the widget is created till now. So we don't need to adapt here. |
d6ab406 to
4a05eb5
Compare
HeikoKlare
reviewed
Oct 15, 2025
3a2a53f to
75df398
Compare
The nativeZoom of some controls currently always has the original native zoom value, even if autoscaling is disabled for that control such that they behave as if their native zoom is effectively 100. With this change the behavior of those control will be fixed as per autoscale disabled value.
75df398 to
17e1814
Compare
HeikoKlare
reviewed
Oct 16, 2025
HeikoKlare
approved these changes
Oct 16, 2025
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.
Few Widgets do not adhere to AUTO_SCALE_DISABLED field when set to true in Widget#setData. The proposed changes are as follow:
Detailed Analysis
These are the widgets or widget utils that should be affected when auto scale is disabled.
When should auto scale disabling function?
Whenever widget#nativeZoom or widget#getNativeZoom is called from any of the widget, the native zoom must be 100%.
Reproduction
The drop scenario sketched above can be easily reproduced with
Snippet257:mainmethod:System.setProperty("swt.autoScale.updateOnRuntime", "true");text.setData("AUTOSCALE_DISABLED", "true");after instantiatingtextHere is how it looks on 200% monitor because of the wrong coordinate conversion:

Expected Behavior
Widget#nativeZoomshall be adapted to always contain the actual native zoom, i.e., 100 in caseautoscaleDisabled==true. All accesses toWidget#nativeZoomshall be summarized in this issue (or in the according PR) and evaluated regarding whether it is correct to use 100 when autoscaling is disabled or not. In cases where it may not be correct,getData(DATA_NATIVE_ZOOM)could be used to access the original native zoom.