diff options
author | 2024-03-06 11:36:33 +0100 | |
---|---|---|
committer | 2024-03-06 11:36:49 +0100 | |
commit | 69bc1df252382a662228c8b0da6f60358e90f376 (patch) | |
tree | 6365e00118e78f24f2f4c308358360477be6258a /examples/svg | |
parent | 40af65c3aa4a96281db8f642cfa1641479314d27 (diff) | |
download | iced-69bc1df252382a662228c8b0da6f60358e90f376.tar.gz iced-69bc1df252382a662228c8b0da6f60358e90f376.tar.bz2 iced-69bc1df252382a662228c8b0da6f60358e90f376.zip |
Simplify theming for `Svg` widget
Diffstat (limited to 'examples/svg')
-rw-r--r-- | examples/svg/src/main.rs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/examples/svg/src/main.rs b/examples/svg/src/main.rs index ba93007c..4e238048 100644 --- a/examples/svg/src/main.rs +++ b/examples/svg/src/main.rs @@ -1,4 +1,3 @@ -use iced::theme; use iced::widget::{checkbox, column, container, svg}; use iced::{color, Element, Length, Sandbox, Settings}; @@ -43,11 +42,11 @@ impl Sandbox for Tiger { let svg = svg(handle).width(Length::Fill).height(Length::Fill).style( if self.apply_color_filter { - theme::Svg::custom_fn(|_theme| svg::Appearance { + |_theme, _status| svg::Appearance { color: Some(color!(0x0000ff)), - }) + } } else { - theme::Svg::Default + |_theme, _status| svg::Appearance::default() }, ); |