-
Notifications
You must be signed in to change notification settings - Fork 182
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
base: master
Are you sure you want to change the base?
Conversation
bundles/org.eclipse.swt/Eclipse SWT/win32/org/eclipse/swt/widgets/Display.java
Outdated
Show resolved
Hide resolved
Test Results 546 files ±0 546 suites ±0 33m 57s ⏱️ + 1m 41s For more details on these failures, see this check. Results for commit 5faa805. ± Comparison against base commit 508ad4a. ♻️ 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
1470815
to
af051bb
Compare
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.
af051bb
to
5faa805
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.
Looks good to me.
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
fromHKCU\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.
How to Test