Skip to content

Pen cursor: a dark rim around light ink, so the dot is as wide as the line - #416

Open
sage-sage wants to merge 1 commit into
Joost-8:mainfrom
sage-sage:fix/pencil-hover-dot-size
Open

sage-sage wants to merge 1 commit into
Joost-8:mainfrom
sage-sage:fix/pencil-hover-dot-size

Conversation

@sage-sage

@sage-sage sage-sage commented Dec 4, 2026 •

Copy link
Copy Markdown

What and why

Follow-up to discussion #404. #409 already fixed the size: thanks, that was the main problem. This is the other half.

The dot's rim is always white. With white or other light ink on dark paper, the white rim reads as part of the dot, so the dot still looks wider than the line it previews. #409 made the rim slimmer, but on a fine line it's still noticeable. The rim exists so dark ink shows up on dark paper, and light ink doesn't need that.

  • A new rimFor(hex) picks the rim by the ink's lightness: white for dark ink, #1a1a1a for light ink.
  • See-through ink (the highlighter) keeps the white rim. It never reads as solid, and the existing highlighter test stays as it is.
  • The faint outer ring is unchanged, and so are the sizes, the mouse cursor's minimum, the laser and the chisel bar.

How it was tested

  • Tests in tests/view/pen-cursor.test.ts: dark ink gets a white rim, white and yellow ink get the dark rim, and a white pen's dot carries the dark rim. All existing cursor tests pass unchanged.

  • Tried on Windows desktop (Obsidian 1.15.1). Not yet checked on the iPad: the hover dot only shows there, so I'll comment here once I have.

  • npm run lint, npm run lint:review, npm run typecheck, npm test and npm run build pass (npm run gates: all 11 steps)

  • Tried on: Windows desktop (iPad pending)

🤖 Generated with Claude Code

… line

The ink dot's rim was always white. Around white or other light ink (on
dark paper) the white rim reads as part of the dot, so the dot under a
hovering Pencil looks wider than the line it previews. A solid light ink
now gets a dark rim (rimFor, by the ink's lightness); dark ink keeps the
white one, and a see-through highlighter keeps white. Discussion Joost-8#404.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant