You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Using ui.horizontal_wrapped() to ui.add() sliders does not seem to wrap them correctly.
To Reproduce
Example code from eframe default app
impl eframe::App for TemplateApp {
/// Called by the frame work to save state before shutdown.
fn save(&mut self, storage: &mut dyn eframe::Storage) {
eframe::set_value(storage, eframe::APP_KEY, self);
}
fn update(&mut self, ctx: &egui::Context, _frame: &mut eframe::Frame) {
let Self { label, value } = self;
egui::CentralPanel::default().show(ctx, |ui| {
ui.horizontal_wrapped(|ui| {
for num in 0..100 {
let resp = ui.add(egui::Slider::new(&mut self.value, 0.0..=9999.0).text(format!("label nr: {:?}",num )));
}
});
// The central panel the region left after adding TopPanel's and SidePanel's
egui::warn_if_debug_build(ui);
});
}
}
Expected behavior
If add is changed to add_sized with nearly any size it wraps correctly.
Screenshots
Regular add:
add_sized with rough approximates of add's response's rect.max- rect.min:
Desktop (please complete the following information):
Describe the bug
Using ui.horizontal_wrapped() to ui.add() sliders does not seem to wrap them correctly.
To Reproduce
Example code from eframe default app
Expected behavior
If add is changed to add_sized with nearly any size it wraps correctly.
Screenshots
Regular add:
add_sized with rough approximates of add's response's rect.max- rect.min:
Desktop (please complete the following information):
Additional context
I somehow managed to do https://media.discordapp.net/attachments/904461220592119849/1081683278706262116/image.png while trying to massage add_sized with ui.set_max_size(egui::Vec2{x:800.0, y:600.0}) but im unable to reproduce it :/, might be related to incorrect sizes
The text was updated successfully, but these errors were encountered: