Pointing-hand cursor over task completion circles - #7
Closed
crazytan wants to merge 1 commit into
Closed
Conversation
Add an opt-in usesPointingHandCursor flag to TaskMenuActionButton that installs a .cursorUpdate tracking area and sets NSCursor.pointingHand while the mouse is over the button, and enable it on the completion circle in the task list rows and the task edit screen.
Deploying taskmenu with
|
| Latest commit: |
89b98c7
|
| Status: | ✅ Deploy successful! |
| Preview URL: | https://afdcfa50.taskmenu.pages.dev |
| Branch Preview URL: | https://worktree-pointing-hand-curso.taskmenu.pages.dev |
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
The mouse cursor now turns into a pointing hand when it's over the circular completion button — both in the task list rows and in the task edit screen.
How
AppKit makes this straightforward.
TaskMenuActionButtonalready had tracking-area plumbing for hover, so this adds:usesPointingHandCursorflag..cursorUpdateadded to the tracking-area options when the flag is set (.inVisibleRectkeeps it correct while the list scrolls).cursorUpdate(with:)override that callsNSCursor.pointingHand.set()(skipped when the button is disabled), plus an arrow reset onmouseExitedso the hand never lingers.Left off by default, so no other icon button changes behavior.
Testing
xcodebuild buildsucceeds.TaskMenuTests/TaskMenuActionButtonTests(4 tests, passing): default is opt-out, enabling installs a.cursorUpdatetracking area,cursorUpdatesets the pointing hand when enabled and leaves the cursor alone when not.