Repository navigation
Conversation
… 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>
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
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.
rimFor(hex)picks the rim by the ink's lightness: white for dark ink,#1a1a1afor light ink.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 testandnpm run buildpass (npm run gates: all 11 steps)Tried on: Windows desktop (iPad pending)
🤖 Generated with Claude Code