Repository navigation
Hand and Zoom cursors drawn like the tool cursors (Windows showed the move arrows, no magnifier) - #1238
Merged
Conversation
On Windows the Hand tool, Space and the Zoom tool showed the wrong cursors: winit maps egui's Grab and Grabbing to the four-headed move cursor (IDC_SIZEALL) and has nothing for ZoomIn/ZoomOut, so the hand appeared as arrows and the magnifier not at all. Those four were the only tool cursors left to the system. They are now vector glyphs like the others (an open and a closed hand, a magnifier with a plus or a minus), shown as OS cursors on the desktop and painted on the web, and the canvas routes the Space, Hand and Zoom states through the same path as the tool cursors. Tests: the glyphs rasterize at every scale with the others; only the busy states stay system cursors. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
… outlines, the plus whole
bflatastic
force-pushed
the
fix-view-cursors
branch
from
October 11, 2026 18:26
cd61e94 to
1c19bf1
Compare
Member
|
Thanks @zakariayacine, merged! Windows finally gets a real hand and magnifier. I added one commit on top. When I rendered the glyphs, the fingers' halos covered each other's outlines, and the plus in the magnifier had a gap where its bars crossed. Now every halo is drawn before any outline, and the plus and minus are drawn without halos, since the lens is already white. Rebased onto main, and the full local gate passed. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What and why
On Windows the Hand tool, Space and the Zoom tool showed the wrong cursors: winit maps egui's
GrabandGrabbingto the four-headed move cursor (IDC_SIZEALL,winit/src/platform_impl/windows/util.rs) and hasnothing for
ZoomIn/ZoomOut, so holding Space showed arrows instead of a hand, and the Zoom tool (Z) showed nomagnifier. Those four were the only tool cursors left to the system (
cursors.rsdrew every other tool).They are now vector glyphs like the others, in the same visual grammar (black on a white halo, Illustrator's
grammar): an open hand with the thumb to the left (Hand tool, Space), the same hand closed while the view is
dragged, and a magnifier with a plus in the lens or a minus with Alt. Shown as OS cursors on the desktop (#444) and
painted on the web as the other glyphs are. The canvas routes the Space, Hand and Zoom states through the same path
as the tool cursors instead of asking egui for system cursors.
How it was tested
cursors::tests: the four glyphs rasterize at every scale with the other 34, inside the 50 px limit, with anopaque body and the hotspot inside the bitmap; only the busy state (
NotAllowed) stays a system cursor.canvas::testspass unchanged (54 tests incursors::andcanvas::).minus.
cargo xtask ci: all 7 steps passed (fmt, clippy, test, assets, brands, layers, wasm).Developed with AI assistance (Claude Code); reviewed and tested locally on Windows 11.
Checklist
cargo xtask cipasses.🤖 Generated with Claude Code