From ea636c9b999dce332d5bfc22bea354498f8ebc6e Mon Sep 17 00:00:00 2001 From: Juan Campa Date: Wed, 15 Nov 2023 11:04:32 -0500 Subject: [PATCH] Fix `Area::constrain_to` clipping shadows --- crates/egui/src/containers/area.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/egui/src/containers/area.rs b/crates/egui/src/containers/area.rs index 4f603717ec1..8b4b969414d 100644 --- a/crates/egui/src/containers/area.rs +++ b/crates/egui/src/containers/area.rs @@ -412,8 +412,8 @@ impl Prepared { let clip_rect_margin = ctx.style().visuals.clip_rect_margin.max(shadow_radius); let clip_rect = Rect::from_min_max(self.state.left_top_pos(), constrain_rect.max) - .expand(clip_rect_margin) - .intersect(constrain_rect); + .intersect(constrain_rect) + .expand(clip_rect_margin); let mut ui = Ui::new( ctx.clone(),