Trait BackgroundContainer

Source
pub trait BackgroundContainer {
    // Required method
    fn background_node(&mut self) -> &mut BackgroundStyle;

    // Provided methods
    fn background_color(self, color: impl Into<Color>) -> Self
       where Self: Sized { ... }
    fn background_image(self, image: Handle<Image>) -> Self
       where Self: Sized { ... }
}
Expand description

Provides background configuration for a UI container

Required Methods§

Source

fn background_node(&mut self) -> &mut BackgroundStyle

Returns a mutable reference to the current background style

Provided Methods§

Source

fn background_color(self, color: impl Into<Color>) -> Self
where Self: Sized,

Sets a solid color as the background

Source

fn background_image(self, image: Handle<Image>) -> Self
where Self: Sized,

Sets an image as the background

Implementors§