From 69bc1df252382a662228c8b0da6f60358e90f376 Mon Sep 17 00:00:00 2001 From: Héctor Ramón Jiménez Date: Wed, 6 Mar 2024 11:36:33 +0100 Subject: Simplify theming for `Svg` widget --- style/src/svg.rs | 28 ---------------------------- 1 file changed, 28 deletions(-) delete mode 100644 style/src/svg.rs (limited to 'style/src/svg.rs') diff --git a/style/src/svg.rs b/style/src/svg.rs deleted file mode 100644 index 3fe5546b..00000000 --- a/style/src/svg.rs +++ /dev/null @@ -1,28 +0,0 @@ -//! Change the appearance of a svg. - -use iced_core::Color; - -/// The appearance of an SVG. -#[derive(Debug, Default, Clone, Copy)] -pub struct Appearance { - /// The [`Color`] filter of an SVG. - /// - /// Useful for coloring a symbolic icon. - /// - /// `None` keeps the original color. - pub color: Option, -} - -/// The stylesheet of a svg. -pub trait StyleSheet { - /// The supported style of the [`StyleSheet`]. - type Style: Default; - - /// 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 { - self.appearance(style) - } -} -- cgit