-
Notifications
You must be signed in to change notification settings - Fork 176
Refactor: Move Cocoa-specific DPI methods to CocoaDPIUtil #2278
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
Refactor: Move Cocoa-specific DPI methods to CocoaDPIUtil #2278
Conversation
Test Results 539 files - 6 539 suites - 6 31m 49s ⏱️ + 1m 49s For more details on these errors, see this check. Results for commit b440e89. ± Comparison against base commit 51fed8e. This pull request removes 37 tests.
♻️ This comment has been updated with latest results. |
65ce2e0
to
25b8fad
Compare
25b8fad
to
2ba91db
Compare
The `autoScale` methods no longer have relevance in the Win32 implementation, so this commit extracts the macOS-specific DPI scaling logic into a dedicated `CocoaDPIUtil` class. This improves platform separation and maintains cleaner, OS-specific code boundaries.
2ba91db
to
b440e89
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 for Mac, I'd like a second opinion. @BeckerWdf ?
What exactly should I comment on? Should I test the change? If yes: How can I test this? |
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/cocoa/org/eclipse/swt/graphics/Image.java
Show resolved
Hide resolved
This PR brings no functional changes with it, it is merely a refactoring. The test consists in running Eclipse performing any action (open a view, edit something, drag stuff around) that runs through the changed method and check that it behaves as it did before. Since this is done in the context of monitors and zooms, you should try it with different zoom levels. The best way is to have 2 monitors with different zooms and test the same things moving the Workbench/Views between the monitors but if you only have 1 monitor, you could simply try by changing the zoom level between operations. Usually, this kind of testing can be done in no more than 10 minutes :-) Thank you! |
Thank you for reviewing! The failing check is unrelated (a test failure on a previous run: #2098) |
The
autoScale
methods no longer have relevance in the Win32 implementation, so this commit extracts the macOS-specific DPI scaling logic into a dedicatedCocoaDPIUtil
class. This improves platform separation and maintains cleaner, OS-specific code boundaries.