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,13 +39,15 @@ 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()
for id in param_ids { // Take up all remaining space, use a wrapper container to adjust how much space that is
let param = param_map[id]; .auto_shrink([false, false])
ui.label(unsafe { param.name() }); .show(ui, |ui| {
unsafe { widget.add_widget_raw(ui, &param, setter) }; for id in param_ids {
} let param = param_map[id];
}); unsafe { widget.add_widget_raw(ui, &param, setter) };
}
});
} }
impl ParamWidget for GenericSlider { impl ParamWidget for GenericSlider {