From a54191f8a737870c1384359db52e462b3602a0d3 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 28 Oct 2024 06:20:17 +0000 Subject: [PATCH 1/3] Update taffy requirement from 0.5 to 0.6 Updates the requirements on [taffy](https://github.com/DioxusLabs/taffy) to permit the latest version. - [Release notes](https://github.com/DioxusLabs/taffy/releases) - [Changelog](https://github.com/DioxusLabs/taffy/blob/main/RELEASES.md) - [Commits](https://github.com/DioxusLabs/taffy/compare/v0.5.0...v0.6.1) --- updated-dependencies: - dependency-name: taffy dependency-type: direct:production ... Signed-off-by: dependabot[bot] --- crates/bevy_ui/Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ui/Cargo.toml b/crates/bevy_ui/Cargo.toml index cc6098b02fed5..1c91861c9752c 100644 --- a/crates/bevy_ui/Cargo.toml +++ b/crates/bevy_ui/Cargo.toml @@ -33,7 +33,7 @@ bevy_window = { path = "../bevy_window", version = "0.15.0-dev" } bevy_utils = { path = "../bevy_utils", version = "0.15.0-dev" } # other -taffy = { version = "0.5" } +taffy = { version = "0.6" } serde = { version = "1", features = ["derive"], optional = true } bytemuck = { version = "1.5", features = ["derive"] } derive_more = { version = "1", default-features = false, features = [ From caa0c4e9eae3be068926b51cd907687786f80c49 Mon Sep 17 00:00:00 2001 From: mnmaita <47983254+mnmaita@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:04:56 +0100 Subject: [PATCH 2/3] Adds new Style fields in UiRect::from_node() --- crates/bevy_ui/src/layout/convert.rs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/crates/bevy_ui/src/layout/convert.rs b/crates/bevy_ui/src/layout/convert.rs index cbe790f3f592b..19e85dbb2d2c7 100644 --- a/crates/bevy_ui/src/layout/convert.rs +++ b/crates/bevy_ui/src/layout/convert.rs @@ -143,6 +143,12 @@ pub fn from_node(node: &Node, context: &LayoutContext, ignore_border: bool) -> t .collect::>(), grid_row: node.grid_row.into(), grid_column: node.grid_column.into(), + // This setting excludes padding/border/margin when specifying size styles. + box_sizing: taffy::BoxSizing::BorderBox, + // Setting this item as false since display:table does not seem to be supported now. + item_is_table: false, + // Setting to Auto assuming we don't want any special legacy text align behaviour. + text_align: taffy::TextAlign::Auto, } } From 5ca999c7330fda3233ae1939d60e85d293de5f87 Mon Sep 17 00:00:00 2001 From: mnmaita <47983254+mnmaita@users.noreply.github.com> Date: Mon, 28 Oct 2024 13:39:41 +0100 Subject: [PATCH 3/3] Fix 'typo' --- crates/bevy_ui/src/layout/convert.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ui/src/layout/convert.rs b/crates/bevy_ui/src/layout/convert.rs index 19e85dbb2d2c7..2a5dffe010581 100644 --- a/crates/bevy_ui/src/layout/convert.rs +++ b/crates/bevy_ui/src/layout/convert.rs @@ -147,7 +147,7 @@ pub fn from_node(node: &Node, context: &LayoutContext, ignore_border: bool) -> t box_sizing: taffy::BoxSizing::BorderBox, // Setting this item as false since display:table does not seem to be supported now. item_is_table: false, - // Setting to Auto assuming we don't want any special legacy text align behaviour. + // Setting to Auto assuming we don't want any special legacy text align behavior. text_align: taffy::TextAlign::Auto, } }