summaryrefslogtreecommitdiffstats
path: root/widget/src/svg.rs
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-24 05:03:09 +0100
committerLibravatar Héctor Ramón Jiménez <hector@hecrj.dev>2024-03-24 05:03:09 +0100
commitf0ae9a0c38c2532220a7460916604914db94c078 (patch)
treea1f0d1732108fa87ce4a63e76def9c38c8804d5d /widget/src/svg.rs
parente657dc2ecd2ffa72c0abd87f9a59dcc1acbc7083 (diff)
downloadiced-f0ae9a0c38c2532220a7460916604914db94c078.tar.gz
iced-f0ae9a0c38c2532220a7460916604914db94c078.tar.bz2
iced-f0ae9a0c38c2532220a7460916604914db94c078.zip
Use `Catalog` approach for all widgets
Diffstat (limited to '')
-rw-r--r--widget/src/svg.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/widget/src/svg.rs b/widget/src/svg.rs
index d2fd0aee..66988097 100644
--- a/widget/src/svg.rs
+++ b/widget/src/svg.rs
@@ -78,7 +78,7 @@ where
}
}
- /// Sets the style of this [`Svg`].
+ /// Sets the style of the [`Svg`].
#[must_use]
pub fn style(mut self, style: impl Fn(&Theme, Status) -> Style + 'a) -> Self
where
@@ -88,7 +88,7 @@ where
self
}
- /// Sets the style class of this [`Svg`].
+ /// Sets the style class of the [`Svg`].
#[cfg(feature = "advanced")]
#[must_use]
pub fn class(mut self, class: impl Into<Theme::Class<'a>>) -> Self {
@@ -176,11 +176,11 @@ where
Status::Idle
};
- let appearance = theme.style(&self.class, status);
+ let style = theme.style(&self.class, status);
renderer.draw(
self.handle.clone(),
- appearance.color,
+ style.color,
drawing_bounds + offset,
);
};
@@ -228,10 +228,10 @@ pub struct Style {
/// The theme catalog of an [`Svg`].
pub trait Catalog {
- /// The item class of this [`Catalog`].
+ /// The item class of the [`Catalog`].
type Class<'a>;
- /// The default class produced by this [`Catalog`].
+ /// The default class produced by the [`Catalog`].
fn default<'a>() -> Self::Class<'a>;
/// The [`Style`] of a class with the given status.