1
0
mirror of https://github.com/emilk/egui.git synced 2026-08-30 13:20:05 -04:00

[grid] Set default row height to interact_size.y

It is what we use for horizontal layouts, and makes sense.
This commit is contained in:
Emil Ernerfeldt
2021-01-15 19:40:12 +01:00
parent 03c9cda89b
commit 480c6db37f
2 changed files with 7 additions and 8 deletions

View File

@@ -54,9 +54,7 @@ impl super::View for WidgetGallery {
color,
} = self;
let grid = egui::Grid::new("my_grid")
.striped(true)
.min_row_height(ui.style().spacing.interact_size.y);
let grid = egui::Grid::new("my_grid").striped(true);
grid.show(ui, |ui| {
ui.label("Label:");
ui.label("Welcome to the widget gallery!");