Repository navigation
scrollable_mask: Keep rounded scroll-table corners clean at any scroll offset - #3400
Merged
Merged
Conversation
A horizontally scrolled table clips with gpui's rectangular content mask, so content poked square into the frame's rounded corner notches once it scrolled — #3309 rounds the rows themselves, which only covers the unscrolled position. Paint a RoundedFrameCover sibling over the viewport: it fills each corner notch with the backdrop color, and the frame's own border, painted after children, stays crisp on top. The cover is exported from gpui-base so application tables with their own rounded scroll frames can reuse it.
ihavecoke
marked this pull request as ready for review
October 8, 2026 02:09
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.
Problem
#3309 rounds the table's first and last rows, which only lines up while the content sits at its unscrolled position. Once a wide table scrolls horizontally, gpui's rectangular content mask slices the clipped side square into the frame's rounded corner notches — the known limit noted in #3309.
Fix
Add
RoundedFrameCover, a sibling overlay (likeScrollableMask) pinned to the viewport: it fills each corner notch — inside the frame's rect corner, outside the border arc — with a backdrop color, so the frame reads as a rounded clip at every scroll offset. The frame's own border paints after its children, so it stays crisp on top of both the scrolled content and the covers; nothing is repainted.horizontal_scroll_areainstalls the cover from the caller style's corner radii, so markdown tables get it automatically. The element is exported from gpui-base —RoundedFrameCover::uniform(radius),.backdrop(color),.frame_border(width)— so application frames with their own rounded scroll viewports can reuse it;frame_bordergrows the notches out to the border box when the cover is a child of the bordered element itself.Before
After
Test
corner_notch_paths_stay_inside_their_corner_squarespins the notch geometry: each path tessellates to an r-sized square anchored at its frame corner.cargo nextest run -p gpui-base scrollable_mask— 17 passed.cargo clippy -p gpui-base --locked -- --deny warnings/cargo fmt -- --check— clean.