diff --git a/widget/src/container.rs b/widget/src/container.rs index 3e054ea6..62ed727d 100644 --- a/widget/src/container.rs +++ b/widget/src/container.rs @@ -458,7 +458,7 @@ pub fn draw_background( } /// The appearance of a container. -#[derive(Debug, Clone, Copy, PartialEq, Default)] +#[derive(Debug, Clone, Copy, PartialEq)] pub struct Style { /// The text [`Color`] of the container. pub text_color: Option, @@ -472,6 +472,18 @@ pub struct Style { pub snap: bool, } +impl Default for Style { + fn default() -> Self { + Self { + text_color: None, + background: None, + border: Border::default(), + shadow: Shadow::default(), + snap: cfg!(feature = "crisp"), + } + } +} + impl Style { /// Updates the text color of the [`Style`]. pub fn color(self, color: impl Into) -> Self {