Skip to content

Refactor: Move Win32-specific DPI logic to Win32DPIUtils #2281

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

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

ShahzaibIbrahim
Copy link
Contributor

@ShahzaibIbrahim ShahzaibIbrahim commented Jul 2, 2025

This commit introduces a dedicated Win32DPIUtils class to isolate Win32-specific DPI logic, improving platform separation and maintainability.

This PR:

@ShahzaibIbrahim ShahzaibIbrahim marked this pull request as draft July 2, 2025 10:01
Copy link
Contributor

github-actions bot commented Jul 2, 2025

Test Results

   546 files  + 1     546 suites  +1   27m 28s ⏱️ - 1m 26s
 4 407 tests + 1   4 388 ✅ ± 0   18 💤 ± 0  1 ❌ +1 
16 713 runs   - 32  16 581 ✅  - 22  131 💤  - 11  1 ❌ +1 

For more details on these failures, see this check.

Results for commit c098aaf. ± Comparison against base commit 6842283.

This pull request removes 11 and adds 12 tests. Note that renamed tests count towards both.
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleDownFloatArray
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleDownInteger
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleDownPoint
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleDownRectangle
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleDownscaleUpPointInvertible
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleDownscaleUpRectangleInvertible
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleUpFloat
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleUpIntArray
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleUpInteger
org.eclipse.swt.tests.junit.DPIUtilTests ‑ scaleUpPoint
…
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleDownFloat
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleDownFloatArray
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleDownInteger
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleDownPoint
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleDownRectangle
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleDownscaleUpPointInvertible
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleDownscaleUpRectangleInvertible
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleUpFloat
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleUpIntArray
AllWin32Tests org.eclipse.swt.tests.win32.Win32DPIUtilTests ‑ scaleUpInteger
…

♻️ This comment has been updated with latest results.

@fedejeanne
Copy link
Contributor

fedejeanne commented Jul 4, 2025

There are quite few changes in this PR. Could you please split it into several commits so I can review better? Try to split the commits where you used automated refactorings and mention "made by using only automated refactoring 'xyz'" in the commit-text.

There are also compile errors.

Removing all autoScale method from DPIUtil and replace it usages with
scaleDown/Up method and pass the zoom from the caller side
@ShahzaibIbrahim ShahzaibIbrahim marked this pull request as draft July 4, 2025 12:12
This commit introduces a dedicated Win32DPIUtils class to isolate
Win32-specific DPI logic, improving platform separation and
maintainability. Refactored moving with eclipse refactoring tool.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Refactor DPIUtil] Move Windows-specific DPI methods to Win32
2 participants