From 5995d0105eeb7f68b10741c95c291664e1813a9d Mon Sep 17 00:00:00 2001 From: ickshonpe Date: Mon, 25 Nov 2024 16:40:51 +0000 Subject: [PATCH] `BorderRadius::percent` fix (#16506) # Objective Fix the `BorderRadius::percent` function so that it sets percentage values, not pixel. --- crates/bevy_ui/src/ui_node.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs index 4a867b90ff3395..704b1d0b03df2f 100644 --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -2191,10 +2191,10 @@ impl BorderRadius { bottom_left: f32, ) -> Self { Self { - top_left: Val::Px(top_left), - top_right: Val::Px(top_right), - bottom_right: Val::Px(bottom_right), - bottom_left: Val::Px(bottom_left), + top_left: Val::Percent(top_left), + top_right: Val::Percent(top_right), + bottom_right: Val::Percent(bottom_right), + bottom_left: Val::Percent(bottom_left), } }