-
Notifications
You must be signed in to change notification settings - Fork 187
SWT: Respect Windows accessibility cursor size setting #2493
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
Conversation
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
Outdated
Show resolved
Hide resolved
Test Results 118 files ±0 118 suites ±0 10m 54s ⏱️ +31s For more details on these failures, see this check. Results for commit 9c5086c. ± Comparison against base commit a479377. ♻️ This comment has been updated with latest results. |
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
Outdated
Show resolved
Hide resolved
f17abb5 to
fdbb769
Compare
2db7bba to
c39fdc0
Compare
b5cfe6b to
1470815
Compare
|
@laeubi @amartya4256 could you please re-review it? I have addressed your comments. |
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
Outdated
Show resolved
Hide resolved
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/graphics/Cursor.java
Outdated
Show resolved
Hide resolved
af051bb to
5faa805
Compare
laeubi
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.
Looks good to me.
amartya4256
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.
Looks good to me now. Caret:getPointerSizeScaleFactor is the better place for it.
On Windows, the mouse pointer size can be increased in Accessibility settings. Previously SWT always created cursors at their logical bitmap size (e.g. 16x16, 32x32), ignoring the accessibility scale. This change reads `CursorBaseSize` from `HKCU\Control Panel\Cursors` and uses it as a scale factor when creating SWT cursors. For example, with scale = 5, a 16px cursor bitmap is scaled to 80px before being displayed, matching the user’s configured pointer size. This aligns SWT custom cursors with the system accessibility setting and improves usability for users with enlarged cursors.
5faa805 to
9c5086c
Compare
|
I rebased to see if the test failures go away and had to manually cancel and restart the workflows afterwards since the Windows tests had some error. Fingers crossed it will work next time. |
|
The Windows tests will likely not succeed because of |
|
Yes, thank you. I noticed it when reviewing other PRs too. |
On Windows, the mouse pointer size can be increased in Accessibility settings. Previously SWT always created cursors at their logical bitmap size (e.g. 16x16, 32x32), ignoring the accessibility scale.
This change reads
CursorBaseSizefromHKCU\Control Panel\Cursorsand uses it as a scale factor when creating SWT cursors. For example, with scale = 5, a 16px cursor bitmap is scaled to 80px before being displayed, matching the user’s configured pointer size.This aligns SWT custom cursors with the system accessibility setting and improves usability for users with enlarged cursors.
How to Test
Snippet386