From feff4d1cba1766a0e4901865f268cc90e7618c62 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Mon, 2 Sep 2024 11:59:35 +0200 Subject: Introduce `container::background` style helper --- widget/src/container.rs | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/widget/src/container.rs b/widget/src/container.rs index ba315741..7eb50120 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -629,6 +629,11 @@ pub fn transparent(_theme: &Theme) -> Style { Style::default() } +/// A [`Container`] with the given [`Background`]. +pub fn background(background: impl Into) -> Style { + Style::default().background(background) +} + /// A rounded [`Container`] with a background. pub fn rounded_box(theme: &Theme) -> Style { let palette = theme.extended_palette(); -- cgit