diff --git a/crates/bevy_ui/src/geometry.rs b/crates/bevy_ui/src/geometry.rs index 291bc5301fba6..8fe46fae47daa 100644 --- a/crates/bevy_ui/src/geometry.rs +++ b/crates/bevy_ui/src/geometry.rs @@ -374,10 +374,10 @@ impl Size { } /// Creates a new [`Size`] where `height` takes the given value. - pub const fn height(width: Val) -> Self { + pub const fn height(height: Val) -> Self { Self { - width, - height: Val::DEFAULT, + width: Val::DEFAULT, + height, } }