mirror of
https://github.com/emilk/egui.git
synced 2026-09-01 14:20:04 -04:00
Make sure plot size is positive (#4429)
* Closes #4425 Fix: in Plot, Minimum values for screen protection.
This commit is contained in:
@@ -97,11 +97,13 @@ impl super::View for ContextMenus {
|
||||
egui::Grid::new("button_grid").show(ui, |ui| {
|
||||
ui.add(
|
||||
egui::DragValue::new(&mut self.width)
|
||||
.clamp_range(0.0..=f32::INFINITY)
|
||||
.speed(1.0)
|
||||
.prefix("Width: "),
|
||||
);
|
||||
ui.add(
|
||||
egui::DragValue::new(&mut self.height)
|
||||
.clamp_range(0.0..=f32::INFINITY)
|
||||
.speed(1.0)
|
||||
.prefix("Height: "),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user