From 590f9c00ab204f1471d2d92def776e64ec7de05c Mon Sep 17 00:00:00 2001 From: hate <15314665+hate@users.noreply.github.com> Date: Fri, 18 Aug 2023 00:01:44 -0400 Subject: [PATCH 1/2] Remove unnecessary doc string --- crates/bevy_ui/src/node_bundles.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/crates/bevy_ui/src/node_bundles.rs b/crates/bevy_ui/src/node_bundles.rs index a8c82a4828893..1f98f4f239c3d 100644 --- a/crates/bevy_ui/src/node_bundles.rs +++ b/crates/bevy_ui/src/node_bundles.rs @@ -76,7 +76,6 @@ pub struct ImageBundle { /// Describes the logical size of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. pub node: Node, /// Styles which control the layout (size and position) of the node and it's children /// In some cases these styles also affect how the node drawn/painted. From 2ebb8ca5bae8c1597967622c0e5adc3ed3944587 Mon Sep 17 00:00:00 2001 From: hate <15314665+hate@users.noreply.github.com> Date: Fri, 18 Aug 2023 09:05:54 -0400 Subject: [PATCH 2/2] Adjust the rest of the documentation --- crates/bevy_ui/src/node_bundles.rs | 21 ++++++++------------- 1 file changed, 8 insertions(+), 13 deletions(-) diff --git a/crates/bevy_ui/src/node_bundles.rs b/crates/bevy_ui/src/node_bundles.rs index 1f98f4f239c3d..84f7940fe1734 100644 --- a/crates/bevy_ui/src/node_bundles.rs +++ b/crates/bevy_ui/src/node_bundles.rs @@ -74,8 +74,6 @@ impl Default for NodeBundle { #[derive(Bundle, Debug, Default)] pub struct ImageBundle { /// Describes the logical size of the node - /// - /// This field is automatically managed by the UI layout system. pub node: Node, /// Styles which control the layout (size and position) of the node and it's children /// In some cases these styles also affect how the node drawn/painted. @@ -97,12 +95,12 @@ pub struct ImageBundle { /// The transform of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. + /// To alter the position of the `ImageBundle`, use the properties of the [`Style`] component. pub transform: Transform, /// The global transform of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. + /// To alter the position of the `ImageBundle`, use the properties of the [`Style`] component. pub global_transform: GlobalTransform, /// Describes the visibility properties of the node pub visibility: Visibility, @@ -116,9 +114,6 @@ pub struct ImageBundle { #[derive(Bundle, Debug, Default)] pub struct AtlasImageBundle { /// Describes the logical size of the node - /// - /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. pub node: Node, /// Styles which control the layout (size and position) of the node and it's children /// In some cases these styles also affect how the node drawn/painted. @@ -142,12 +137,12 @@ pub struct AtlasImageBundle { /// The transform of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. + /// To alter the position of the `AtlasImageBundle`, use the properties of the [`Style`] component. pub transform: Transform, /// The global transform of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. + /// To alter the position of the `AtlasImageBundle`, use the properties of the [`Style`] component. pub global_transform: GlobalTransform, /// Describes the visibility properties of the node pub visibility: Visibility, @@ -179,12 +174,12 @@ pub struct TextBundle { /// The transform of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. + /// To alter the position of the `TextBundle`, use the properties of the [`Style`] component. pub transform: Transform, /// The global transform of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. + /// To alter the position of the `TextBundle`, use the properties of the [`Style`] component. pub global_transform: GlobalTransform, /// Describes the visibility properties of the node pub visibility: Visibility, @@ -291,12 +286,12 @@ pub struct ButtonBundle { /// The transform of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. + /// To alter the position of the `ButtonBundle`, use the properties of the [`Style`] component. pub transform: Transform, /// The global transform of the node /// /// This field is automatically managed by the UI layout system. - /// To alter the position of the `NodeBundle`, use the properties of the [`Style`] component. + /// To alter the position of the `ButtonBundle`, use the properties of the [`Style`] component. pub global_transform: GlobalTransform, /// Describes the visibility properties of the node pub visibility: Visibility,