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 <https://github.com/emilk/egui/issues/3956>.
This commit is contained in:
parent
1636b6af08
commit
a6a9501d12
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue