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:
@@ -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();
|
||||
|
||||
Reference in New Issue
Block a user