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 <alice.i.cecile@gmail.com>
This commit is contained in:
ickshonpe 2024-10-28 22:27:19 +00:00 committed by François
parent ebce9dbaec
commit c3442314f6
No known key found for this signature in database

View File

@ -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.
///