Backdrop: Radius for a rounded solid ground - #217
Merged
Conversation
Backdrop filled a plain rectangle, so a host wanting a rounded pill/chip/badge ground under an icon or label had to hand-draw a FillRoundRect. Radius > 0 now fills a rounded rectangle (via the shared fillRoundRect helper); the zero value keeps the plain FillRect, byte-identical to before. This lets a composed feed / browser draw its subscribe/status markers as a Backdrop widget rather than a raw painter call. 100% statement coverage; gofmt + vet clean. Co-Authored-By: Claude Opus 4.8 <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
Backdropfilled a plain rectangle, so a host wanting a rounded pill/chip/badge ground under an icon or label had to hand-draw aFillRoundRect.Change
Radius int:> 0fills a rounded rectangle (via the sharedfillRoundRecthelper); the zero value keeps the plainFillRect, byte-identical to before. A grid (Step > 0) is drawn as before.Why
Lets a composed feed/browser draw its subscribe/status marker grounds as a
Backdropwidget instead of a rawp.FillRoundRect— the last hand-drawn shape in the reader's newsgroup-browser row.Tests / gates
TestBackdropRadius: rounded fill leaves the sharp corner unpainted while filling the centre; the zero-radius fill still covers the corner.gofmt+go vetclean.🤖 Generated with Claude Code