Skip to content

Revise the Cursor class to support scaling #2271

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

arunjose696
Copy link
Contributor

Previously, cursors were initialized with a single ImageData, which caused issues on systems with varying zoom levels, for example, cursors were not scaled at all on Linux, or were blurrily auto-scaled on Windows.

This commit introduces a new constructor for the Cursor class that accepts an Image object instead of ImageData. This allows the code instantiating the cursor to pass an image capable of providing appropriately scaled image data based on the current zoom level.

Copy link
Contributor

github-actions bot commented Jun 27, 2025

Test Results

   545 files  + 6     545 suites  +6   28m 57s ⏱️ - 2m 25s
 4 404 tests +38   4 386 ✅ +61   18 💤 +3  0 ❌  - 7 
16 737 runs  +41  16 597 ✅ +64  140 💤 +3  0 ❌  - 7 

Results for commit ff21b33. ± Comparison against base commit 8a8c67d.

♻️ This comment has been updated with latest results.

@arunjose696 arunjose696 linked an issue Jun 27, 2025 that may be closed by this pull request
Previously, cursors were initialized with a single ImageData, which
caused issues on systems with varying zoom levels, for example, cursors
were not scaled at all on Linux, or were blurrily auto-scaled on
Windows.

This commit introduces a new constructor for the Cursor class that
accepts an Image object instead of ImageData. This allows the code
instantiating the cursor to pass an image capable of providing
appropriately scaled image data based on the current zoom level.
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.

Make cursors HiDPI-aware
1 participant