mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 21:00:03 -04:00
egui_extras Table/Strip: less aggressive cell clipping
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user