summaryrefslogtreecommitdiffstats
path: root/widget
diff options
context:
space:
mode:
Diffstat (limited to 'widget')
-rw-r--r--widget/src/container.rs5
1 files changed, 5 insertions, 0 deletions
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: &Theme) -> Style {
Style::default()
}
+/// A [`Container`] with the given [`Background`].
+pub fn background(background: impl Into<Background>) -> Style {
+ Style::default().background(background)
+}
+
/// A rounded [`Container`] with a background.
pub fn rounded_box(theme: &Theme) -> Style {
let palette = theme.extended_palette();