Revert "gpui: Fix overflow_hidden to support clip with border radius" (#37480)

This reverts commit 40199266b6.

The issue with the commit is: ContentMask<Pixels>::intersect is doing
intersection of corner radii which makes inner containers use the max
corner radius out of all the parents when it should be more complex to
correctly clip children (clip sorting..?)

Release Notes:

- N/A
This commit is contained in:
localcc
2025-09-03 19:52:47 +00:00
committed by GitHub
parent eedfc5be5a
commit bb2d833373
11 changed files with 130 additions and 446 deletions
+4 -12
View File
@@ -303,13 +303,9 @@ impl Element for Scrollbar {
window: &mut Window,
_: &mut App,
) -> Self::PrepaintState {
window.with_content_mask(
Some(ContentMask {
bounds,
..Default::default()
}),
|window| window.insert_hitbox(bounds, HitboxBehavior::Normal),
)
window.with_content_mask(Some(ContentMask { bounds }), |window| {
window.insert_hitbox(bounds, HitboxBehavior::Normal)
})
}
fn paint(
@@ -323,11 +319,7 @@ impl Element for Scrollbar {
cx: &mut App,
) {
const EXTRA_PADDING: Pixels = px(5.0);
let content_mask = ContentMask {
bounds,
..Default::default()
};
window.with_content_mask(Some(content_mask), |window| {
window.with_content_mask(Some(ContentMask { bounds }), |window| {
let axis = self.kind;
let colors = cx.theme().colors();
let thumb_state = self.state.thumb_state.get();