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

[grid] Allow putting a separator in a grid

This commit is contained in:
Emil Ernerfeldt
2021-01-16 11:34:59 +01:00
parent a5ce1ba711
commit 07f1b074ca
5 changed files with 27 additions and 12 deletions

View File

@@ -35,7 +35,6 @@ impl super::Demo for WidgetGallery {
fn show(&mut self, ctx: &egui::CtxRef, open: &mut bool) {
egui::Window::new(self.name())
.open(open)
.default_width(200.0)
.resizable(false)
.show(ctx, |ui| {
use super::View;
@@ -131,9 +130,7 @@ impl super::View for WidgetGallery {
ui.end_row();
ui.label("Separator:");
// Putting a separator in a grid is kind of meaningless since there is no well-defined direction.
// Normally you'd just do ui.separator(), but here we need to explicitly pick a dimension:
ui.add(egui::Separator::new().horizontal());
ui.separator();
ui.end_row();
ui.label("CollapsingHeader:");