From 619c5e3bda5d22e0f199c381c1f726edc5431143 Mon Sep 17 00:00:00 2001 From: ickshonpe Date: Wed, 6 Nov 2024 14:56:28 +0000 Subject: [PATCH] Require `ContentSize` for `UiImage` (#16262) # Objective Automatic imaging sizing for image nodes isn't working because the the `ContentSize` requirement for `UiImage` got lost in some merge again. Fixes #16239 Fixes #16240 Fixes the missing images seen in #16241 ## Solution Require `ContentSize` for `UiImage`. --- crates/bevy_ui/src/widget/image.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/bevy_ui/src/widget/image.rs b/crates/bevy_ui/src/widget/image.rs index 83dbc1fc76..729561c319 100644 --- a/crates/bevy_ui/src/widget/image.rs +++ b/crates/bevy_ui/src/widget/image.rs @@ -12,7 +12,7 @@ use taffy::{MaybeMath, MaybeResolve}; /// The 2D texture displayed for this UI node #[derive(Component, Clone, Debug, Reflect)] #[reflect(Component, Default, Debug)] -#[require(Node, UiImageSize)] +#[require(Node, UiImageSize, ContentSize)] pub struct UiImage { /// The tint color used to draw the image. ///