From 79f47b763b5aef3f2f259669ff1ece3f0e766ebd Mon Sep 17 00:00:00 2001 From: Ivan <68190772+IVAN-MK7@users.noreply.github.com> Date: Mon, 5 Feb 2024 08:34:46 +0100 Subject: [PATCH] Fix `StripBuilder` not allocating its used space (#3957) At crates\egui_extras\src\layout.rs : Allocate allocation_rect instead of max_rect. Go back from this: ``` let response = self.ui.allocate_rect(max_rect, self.sense); let response = response.with_new_rect(allocation_rect); return (used_rect, response) ``` to this: ``` let response = self.ui.allocate_rect(allocation_rect, self.sense); return (used_rect, response) ``` In order to allocate the Closes . --- crates/egui_extras/src/layout.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/crates/egui_extras/src/layout.rs b/crates/egui_extras/src/layout.rs index e2bfc7b353a3..e2868ed729a0 100644 --- a/crates/egui_extras/src/layout.rs +++ b/crates/egui_extras/src/layout.rs @@ -145,7 +145,6 @@ impl<'l> StripLayout<'l> { ); } - let response = self.ui.allocate_rect(max_rect, self.sense); let used_rect = self.cell(flags, max_rect, add_cell_contents); self.set_pos(max_rect); @@ -156,7 +155,7 @@ impl<'l> StripLayout<'l> { max_rect.union(used_rect) }; - let response = response.with_new_rect(allocation_rect); + let response = self.ui.allocate_rect(allocation_rect, self.sense); (used_rect, response) }