Pointing-hand cursor over task checkboxes (and hover in inactive windows) - #134
Closed
dylandeheer wants to merge 2 commits into
Closed
Pointing-hand cursor over task checkboxes (and hover in inactive windows)#134dylandeheer wants to merge 2 commits into
dylandeheer wants to merge 2 commits into
Conversation
The theme can recolor every element except heading text (it inherits bodyText), and the heading config covers every metric except the face — so an embedder that wants serif display headings over a sans body has to fork. HeadingStyle.fontName picks a PostScript face for headings, honored exactly so the chosen weight survives; an unresolvable name falls back to the stock bold base font, like TaskCheckboxStyle's symbol fallback. MarkdownEditorTheme.headingText colors heading text while the `#` glyphs stay on headingMarker and inline constructs inside a heading keep their own ink. Emphasis inside a heading still composes on top of the configured face (traits added, family and per-level size kept). Both knobs default to nil, which keeps styling identical to before. Co-authored-by: Cursor <cursoragent@cursor.com>
The drawn checkbox toggles on click, so it reads as a button — show the pointing hand over its hit zone in edit mode (shared taskCheckboxHit geometry) instead of the plain arrow. NSTextView's own cursor tracking goes quiet while the window isn't key, freezing hover cursors on inactive editor panels; one extra .activeInActiveApp tracking area keeps mouseMoved/mouseEntered flowing app-wide (the handlers are idempotent, so overlap with the system areas in a key window is harmless). Co-authored-by: Cursor <cursoragent@cursor.com>
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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 drawn task checkbox toggles on click but showed the plain arrow on hover. It now shows the pointing hand in edit mode — it is a button-like control, matching links. An extra tracking area also keeps hover cursors responsive while the editor's window isn't key.
How
isOverTaskCheckboxBoxbranches inNativeTextView+CursorRects.swiftsetNSCursor.pointingHandinstead of.arrow(same sharedtaskCheckboxHitgeometry as the click path; the flicker-avoidance structure — skippingsuper— is unchanged).updateTrackingAreasinstalls one.activeInActiveApp+.inVisibleRect+.mouseMoved/.mouseEnteredAndExitedtracking area, because NSTextView's own cursor tracking goes quiet while the window isn't key, freezing hover cursors on inactive editor panels. The handlers are idempotent, so overlapping with the system areas in a key window is harmless.Defaults
Read-only mode is unchanged (checkbox toggling is blocked by
shouldChangeTextthere, so the arrow stays honest). No configuration surface added.Tests
CheckboxCursorTrackingTests: the tracking area is installed with the right options and replaced (not stacked) on repeatedupdateTrackingAreascalls. The cursor set itself is exercised manually — NSCursor state isn't observable headless.Made with Cursor