diff options
Diffstat (limited to '')
| -rw-r--r-- | style/src/svg.rs | 3 | ||||
| -rw-r--r-- | style/src/theme.rs | 8 | 
2 files changed, 11 insertions, 0 deletions
| diff --git a/style/src/svg.rs b/style/src/svg.rs index 9378c1a7..5053f9f8 100644 --- a/style/src/svg.rs +++ b/style/src/svg.rs @@ -20,4 +20,7 @@ pub trait StyleSheet {      /// Produces the [`Appearance`] of the svg.      fn appearance(&self, style: &Self::Style) -> Appearance; + +    /// Produces the hovered [`Appearance`] of a svg content. +    fn hovered(&self, style: &Self::Style) -> Appearance;  } diff --git a/style/src/theme.rs b/style/src/theme.rs index deccf455..f78587e5 100644 --- a/style/src/theme.rs +++ b/style/src/theme.rs @@ -939,6 +939,10 @@ impl svg::StyleSheet for Theme {              Svg::Custom(custom) => custom.appearance(self),          }      } + +    fn hovered(&self, style: &Self::Style) -> svg::Appearance { +        self.appearance(style) +    }  }  impl svg::StyleSheet for fn(&Theme) -> svg::Appearance { @@ -947,6 +951,10 @@ impl svg::StyleSheet for fn(&Theme) -> svg::Appearance {      fn appearance(&self, style: &Self::Style) -> svg::Appearance {          (self)(style)      } + +    fn hovered(&self, style: &Self::Style) -> svg::Appearance { +        self.appearance(style) +    }  }  /// The style of a scrollable. | 
