diff options
| author | pml68 <contact@pml68.dev> | 2025-04-17 00:29:42 +0200 |
|---|---|---|
| committer | pml68 <contact@pml68.dev> | 2025-04-17 00:29:42 +0200 |
| commit | 70f7cd31eb5055f80664c574e46003b202b2206f (patch) | |
| tree | 2589b230be76d73bf562415508d98a5b1fa0c9f5 /crates/material_theme/src/svg.rs | |
| parent | feat(material_theme): implement `markdown::Catalog` (under feature flag) (diff) | |
| download | iced-builder-70f7cd31eb5055f80664c574e46003b202b2206f.tar.gz | |
feat(material_theme): implement `svg::Catalog` (under feature flag)
Diffstat (limited to 'crates/material_theme/src/svg.rs')
| -rw-r--r-- | crates/material_theme/src/svg.rs | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/crates/material_theme/src/svg.rs b/crates/material_theme/src/svg.rs new file mode 100644 index 0000000..885d743 --- /dev/null +++ b/crates/material_theme/src/svg.rs @@ -0,0 +1,15 @@ +use iced_widget::svg::{Catalog, Status, Style, StyleFn}; + +use super::Theme; + +impl Catalog for Theme { + type Class<'a> = StyleFn<'a, Self>; + + fn default<'a>() -> Self::Class<'a> { + Box::new(|_theme, _status| Style::default()) + } + + fn style(&self, class: &Self::Class<'_>, status: Status) -> Style { + class(self, status) + } +} |
