Use closures for Svg::style
This commit is contained in:
parent
66dce4865e
commit
71b9b3c3b1
3 changed files with 31 additions and 25 deletions
|
|
@ -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
|
||||
},
|
||||
},
|
||||
);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue