mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Add ui.shrink_clip_rect (#5068)
This commit is contained in:
@@ -215,7 +215,7 @@ impl<'l> StripLayout<'l> {
|
||||
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 = max_rect.expand2(margin);
|
||||
child_ui.set_clip_rect(clip_rect.intersect(child_ui.clip_rect()));
|
||||
child_ui.shrink_clip_rect(clip_rect);
|
||||
|
||||
if !child_ui.is_sizing_pass() {
|
||||
// Better to truncate (if we can), rather than hard clipping:
|
||||
|
||||
Reference in New Issue
Block a user