crates: egui_demo_lib: Fix table height (#4422)

* Closes #4404

Signed-off-by: Patrick José Pereira <patrickelectric@gmail.com>
This commit is contained in:
Patrick José Pereira 2024-04-29 06:16:55 -03:00 committed by GitHub
parent 3bb33980a9
commit af39bd22ab
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 3 additions and 1 deletions

View File

@ -136,6 +136,7 @@ impl TableDemo {
.size
.max(ui.spacing().interact_size.y);
let available_height = ui.available_height();
let mut table = TableBuilder::new(ui)
.striped(self.striped)
.resizable(self.resizable)
@ -145,7 +146,8 @@ impl TableDemo {
.column(Column::initial(100.0).range(40.0..=300.0))
.column(Column::initial(100.0).at_least(40.0).clip(true))
.column(Column::remainder())
.min_scrolled_height(0.0);
.min_scrolled_height(0.0)
.max_scroll_height(available_height);
if self.clickable {
table = table.sense(egui::Sense::click());