Clean up filter animations

This commit is contained in:
Anthony Ramine 2017-08-21 11:10:44 +02:00
parent baf3597477
commit 54dc3e1670
2 changed files with 86 additions and 101 deletions

View file

@ -245,7 +245,11 @@ impl ToAnimatedZero for SimpleShadow {
#[inline]
fn to_animated_zero(&self) -> Result<Self, ()> {
Ok(SimpleShadow {
color: Some(RGBA::transparent()),
color: if let Some(color) = self.color.as_ref() {
Some(color.to_animated_zero()?)
} else {
None
},
horizontal: self.horizontal.to_animated_zero()?,
vertical: self.vertical.to_animated_zero()?,
blur: self.blur.to_animated_zero()?,