Skip to content

Commit

Permalink
Update placer.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
rustbasic authored May 15, 2024
1 parent ccbc9bf commit 88828b0
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions crates/egui/src/placer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand All @@ -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;
Expand Down

0 comments on commit 88828b0

Please sign in to comment.