Skip to content

Commit 196e84d

Browse files
impl Deref for BackgroundColor (#22172)
# Objective Many newtypes in Bevy implement `Deref` and `DerefMut` for convenience. Let us extend that to `BackgroundColor`. ## Solution Derived `Deref` and `DerefMut` for `BackgroundColor`.
1 parent fbc2ab2 commit 196e84d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

crates/bevy_ui/src/ui_node.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,7 @@ pub enum GridPlacementError {
22052205
/// The background color of the node
22062206
///
22072207
/// This serves as the "fill" color.
2208-
#[derive(Component, Copy, Clone, Debug, PartialEq, Reflect)]
2208+
#[derive(Component, Copy, Clone, Debug, Deref, DerefMut, PartialEq, Reflect)]
22092209
#[reflect(Component, Default, Debug, PartialEq, Clone)]
22102210
#[cfg_attr(
22112211
feature = "serialize",

0 commit comments

Comments
 (0)