-
Notifications
You must be signed in to change notification settings - Fork 191
Add Shell#getZoom() #2930
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
Add Shell#getZoom() #2930
Conversation
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.
What's the purpose of this renaming?
Since #2863 (comment) in this comment youhad requested to expose the API with a better name that makes sense, i.e. |
d10241e to
fc87e89
Compare
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/widgets/Shell.java
Outdated
Show resolved
Hide resolved
fc87e89 to
e40ae0e
Compare
e40ae0e to
45e6f13
Compare
45e6f13 to
c5221e6
Compare
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.
I've fixed the compilation error on MacOS (missing import) and faulty commit messages. I also updated the outdated PR title and description. With that, the PR is fine for me.
@akoch-yatta can you please also have a look?
After merging this, we also need to add a N&N for the new API.
This commit renames the method Widget#getZoom to getAutoscalingZoom since this methods return the value of the zoom based on the autoscaling technique, i.e. quarter, half, etc and whether autoscaling is enabled or disabled.
This commit adds an API Shell#getZoom() which returns the native zoom of the shell.
c5221e6 to
aef7bf3
Compare
akoch-yatta
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.
LGTM as well
This adds a
Shell#getZoom()method to make the zoom of a shell as considered by the OS available to consumers. Currently, there is a (undocumented) data field on controls in the Windows implementation for this (SHELL_ZOOM). And for other operating system (which only use a static zoom value for everything), the value is provided internally viaDPIUtil#getNativeDeviceZoom()and may also be calculated fromDevice#getDPI().It also serves as a preparation for allowing explicit disablement of auto-scaling for specific controls as proposed with #2863, which requires access to the shell's zoom to custom-zoom auto-scale-disabled controls.
This PR also renames the method Widget#getZoom to getAutoscalingZoom since this methods return the value of the zoom based on the autoscaling technique, i.e. quarter, half, etc and whether autoscaling is enabled or disabled, and would conflict with the newly added
Shell#getZoom()method.Note: This change has been made using Eclipse refactoring tool.