mirror of
https://github.com/emilk/egui.git
synced 2026-08-29 04:40:03 -04:00
Remove clip_rect_margin (#8366)
* Closes https://github.com/emilk/egui/issues/5605 It has been zero by default for a few months now, and I do not wish to support it. It was always an ugly hack, and it is no longer needed.
This commit is contained in:
@@ -217,10 +217,7 @@ impl<'l> StripLayout<'l> {
|
||||
let mut child_ui = self.ui.new_child(ui_builder);
|
||||
|
||||
if flags.clip {
|
||||
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.shrink_clip_rect(clip_rect);
|
||||
child_ui.shrink_clip_rect(max_rect);
|
||||
|
||||
if !child_ui.is_sizing_pass() {
|
||||
// Better to truncate (if we can), rather than hard clipping:
|
||||
|
||||
Reference in New Issue
Block a user