-
Notifications
You must be signed in to change notification settings - Fork 174
Refactor: Move GTK-specific DPI logic to GtkDPIUtil #2280
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
base: master
Are you sure you want to change the base?
Conversation
31e4bc1
to
58bbc0c
Compare
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 would definitly split this one up into two PRs. One only containing the removal of probably unecessary DPIUtil-calls, and a second one with the rest
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GtkDPIUtil.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/gtk/org/eclipse/swt/internal/GtkDPIUtil.java
Outdated
Show resolved
Hide resolved
This commit introduces a dedicated `GtkDPIUtil` class to isolate GTK-specific DPI logic, improving platform separation and maintainability. Since the GTK scaling factor is always 1, the `autoScaleUp` and `autoScaleDown` methods effectively return the input unchanged. These methods and their usages have been removed from the GTK implementation to eliminate unnecessary code. Also clarifies that `autoScale` no longer applies to the Win32 implementation and is being decoupled accordingly.
58bbc0c
to
daf36ff
Compare
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 but since this is GTK, I would like the opinion of @iloveeclipse and/or @akurtakov before merging it.
This commit introduces a dedicated
GtkDPIUtil
class to isolate GTK-specific DPI logic, improving platform separation and maintainability.Since the GTK scaling factor is always 1, the
autoScaleUp
andautoScaleDown
methods effectively return the input unchanged. These methods and their usages have been removed from the GTK implementation to eliminate unnecessary code.Also clarifies that
autoScale
no longer applies to the Win32 implementation and is being decoupled accordingly.