From c3442314f67b19798d695f6f85e5ce52188f6fa2 Mon Sep 17 00:00:00 2001 From: ickshonpe Date: Mon, 28 Oct 2024 22:27:19 +0000 Subject: [PATCH] Require `ContentSize` on `UiImage` again (#16138) The `ContentSize` requirement on `UiImage` got lost during merge conflict fixes, causing some images such as the icons on the `game_menu` example to disappear. Fixes #16136 Require `ContentSize` on `UiImage` again. --------- Co-authored-by: Alice Cecile --- crates/bevy_ui/src/ui_node.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/crates/bevy_ui/src/ui_node.rs b/crates/bevy_ui/src/ui_node.rs index b377aa29e8..9c2a6fd0ea 100644 --- a/crates/bevy_ui/src/ui_node.rs +++ b/crates/bevy_ui/src/ui_node.rs @@ -1,4 +1,4 @@ -use crate::{widget::UiImageSize, FocusPolicy, UiRect, Val}; +use crate::{widget::UiImageSize, ContentSize, FocusPolicy, UiRect, Val}; use bevy_asset::Handle; use bevy_color::Color; use bevy_ecs::{prelude::*, system::SystemParam}; @@ -2042,7 +2042,7 @@ impl Outline { /// 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. ///