egui_extras Table/Strip: less aggressive cell clipping
This commit is contained in:
parent
917f9e1768
commit
e97241861e
1 changed files with 4 additions and 1 deletions
|
@ -142,7 +142,10 @@ impl<'l> StripLayout<'l> {
|
|||
let mut child_ui = self.ui.child_ui(rect, self.cell_layout);
|
||||
|
||||
if self.clip {
|
||||
child_ui.set_clip_rect(child_ui.clip_rect().intersect(rect));
|
||||
let margin = egui::Vec2::splat(self.ui.visuals().clip_rect_margin);
|
||||
let margin = margin.min(0.5 * self.ui.spacing().item_spacing);
|
||||
let clip_rect = rect.expand2(margin);
|
||||
child_ui.set_clip_rect(clip_rect.intersect(child_ui.clip_rect()));
|
||||
}
|
||||
|
||||
add_contents(&mut child_ui);
|
||||
|
|
Loading…
Reference in a new issue