summaryrefslogtreecommitdiffstats
path: root/style/src/svg.rs
diff options
context:
space:
mode:
Diffstat (limited to 'style/src/svg.rs')
-rw-r--r--style/src/svg.rs12
1 files changed, 7 insertions, 5 deletions
diff --git a/style/src/svg.rs b/style/src/svg.rs
index 66791d04..9378c1a7 100644
--- a/style/src/svg.rs
+++ b/style/src/svg.rs
@@ -2,20 +2,22 @@
use iced_core::Color;
-/// The appearance of a svg.
+/// The appearance of an SVG.
#[derive(Debug, Default, Clone, Copy)]
pub struct Appearance {
- /// Changes the fill color
+ /// The [`Color`] filter of an SVG.
///
/// Useful for coloring a symbolic icon.
- pub fill: Option<Color>,
+ ///
+ /// `None` keeps the original color.
+ pub color: Option<Color>,
}
/// The stylesheet of a svg.
pub trait StyleSheet {
/// The supported style of the [`StyleSheet`].
- type Style: Default + Copy;
+ type Style: Default;
/// Produces the [`Appearance`] of the svg.
- fn appearance(&self, style: Self::Style) -> Appearance;
+ fn appearance(&self, style: &Self::Style) -> Appearance;
}