1
0
Fork 0

Take up all remaining space in generic UI

This commit is contained in:
Robbert van der Helm 2022-03-05 19:24:40 +01:00
parent 05d97bb71e
commit 2c56646cc9

View file

@ -39,10 +39,12 @@ pub fn create(
let param_map = params.param_map(); let param_map = params.param_map();
let param_ids = params.param_ids(); let param_ids = params.param_ids();
egui::containers::ScrollArea::vertical().show(ui, |ui| { egui::containers::ScrollArea::vertical()
// Take up all remaining space, use a wrapper container to adjust how much space that is
.auto_shrink([false, false])
.show(ui, |ui| {
for id in param_ids { for id in param_ids {
let param = param_map[id]; let param = param_map[id];
ui.label(unsafe { param.name() });
unsafe { widget.add_widget_raw(ui, &param, setter) }; unsafe { widget.add_widget_raw(ui, &param, setter) };
} }
}); });