diff --git a/crates/egui/src/placer.rs b/crates/egui/src/placer.rs index c96d4b1921b..0be6b413b22 100644 --- a/crates/egui/src/placer.rs +++ b/crates/egui/src/placer.rs @@ -218,7 +218,6 @@ impl Placer { /// Set the maximum width of the ui. /// You won't be able to shrink it below the current minimum size. pub(crate) fn set_max_width(&mut self, width: f32) { - let width = width.max(0.0); let rect = self.next_widget_space_ignore_wrap_justify(vec2(width, 0.0)); let region = &mut self.region; region.max_rect.min.x = rect.min.x; @@ -234,7 +233,6 @@ impl Placer { /// Set the maximum height of the ui. /// You won't be able to shrink it below the current minimum size. pub(crate) fn set_max_height(&mut self, height: f32) { - let height = height.max(0.0); let rect = self.next_widget_space_ignore_wrap_justify(vec2(0.0, height)); let region = &mut self.region; region.max_rect.min.y = rect.min.y;