Dim and shrink cursor after idle timeout#85
Open
sat-sat wants to merge 1 commit intofarzaa:mainfrom
Open
Conversation
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.
Adds an idle state to the Clicky cursor that makes it less visually intrusive when you're not actively moving the mouse.
What it does:
Implementation:
The existing 60fps cursor-tracking timer already polls
NSEvent.mouseLocationon every tick. This adds alastCursorMovementDatetimestamp that resets on any movement over 2px. On each tick where the cursor is still, elapsed time is checked andcursorIdleDimFactoris set directly if the threshold is exceeded — the same direct@Statemutation pattern used bycursorPositionand the bezier flight animation. The.animation(_, value: cursorIdleDimFactor)modifier on each cursor element handles the easing without needing a separate timer.