Skip to content

Commit

Permalink
Change default max_scroll_height of egui::Table to f32::INFINITY (
Browse files Browse the repository at this point in the history
emilk#4817)

`egui::Table` has a weirdly specific default `max_scroll_height` set to
800.0. This means that even with `vscroll(true)` and `auto_shrink([_,
false])`, the table will not expend to the full available height. This
PR changes this value to `f32::INFINITY`. This makes it consistent with
the corresponding default value of `ScrollArea::max_size.y`, which is
where that `max_scroll_height` ends up being used.
  • Loading branch information
abey79 authored Jul 12, 2024
1 parent 7f899c1 commit 08c75d7
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crates/egui_extras/src/table.rs
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ impl Default for TableScrollOptions {
scroll_to_row: None,
scroll_offset_y: None,
min_scrolled_height: 200.0,
max_scroll_height: 800.0,
max_scroll_height: f32::INFINITY,
auto_shrink: Vec2b::TRUE,
scroll_bar_visibility: ScrollBarVisibility::VisibleWhenNeeded,
}
Expand Down

0 comments on commit 08c75d7

Please sign in to comment.