summaryrefslogtreecommitdiffstats
path: root/examples/svg/src
diff options
context:
space:
mode:
authorLibravatar Héctor Ramón <hector@hecrj.dev>2024-03-12 18:17:19 +0100
committerLibravatar GitHub <noreply@github.com>2024-03-12 18:17:19 +0100
commit3d915d3cb30e5d08829aa2928676a53c505a601e (patch)
tree4acb46e00ef3037aad6a8273ab67d4278d560784 /examples/svg/src
parent34317bba5db0a0f9e3ffdbbac0d7136a32bd0f95 (diff)
parent98621aa344a7a0e1b23f320d21a4687af559998e (diff)
downloadiced-3d915d3cb30e5d08829aa2928676a53c505a601e.tar.gz
iced-3d915d3cb30e5d08829aa2928676a53c505a601e.tar.bz2
iced-3d915d3cb30e5d08829aa2928676a53c505a601e.zip
Merge pull request #2326 from iced-rs/closure-styles
Use closures for widget styling
Diffstat (limited to 'examples/svg/src')
-rw-r--r--examples/svg/src/main.rs12
1 files changed, 6 insertions, 6 deletions
diff --git a/examples/svg/src/main.rs b/examples/svg/src/main.rs
index 4e238048..0870dce4 100644
--- a/examples/svg/src/main.rs
+++ b/examples/svg/src/main.rs
@@ -41,12 +41,12 @@ impl Sandbox for Tiger {
));
let svg = svg(handle).width(Length::Fill).height(Length::Fill).style(
- if self.apply_color_filter {
- |_theme, _status| svg::Appearance {
- color: Some(color!(0x0000ff)),
- }
- } else {
- |_theme, _status| svg::Appearance::default()
+ |_theme, _status| svg::Appearance {
+ color: if self.apply_color_filter {
+ Some(color!(0x0000ff))
+ } else {
+ None
+ },
},
);