From 5e6a6f7e03b398f6d8860bc098167df08e19e272 Mon Sep 17 00:00:00 2001 From: Jumar Macato Date: Sun, 9 Sep 2018 20:44:32 +0800 Subject: [PATCH] Add explicit double type marker on values. Flip the sign on distance to match the correct behavior. --- src/Avalonia.Visuals/Animation/CrossFade.cs | 8 ++++---- src/Avalonia.Visuals/Animation/PageSlide.cs | 14 +++++++------- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Avalonia.Visuals/Animation/CrossFade.cs b/src/Avalonia.Visuals/Animation/CrossFade.cs index 3795d66d05..d5ddf1c7f5 100644 --- a/src/Avalonia.Visuals/Animation/CrossFade.cs +++ b/src/Avalonia.Visuals/Animation/CrossFade.cs @@ -38,11 +38,11 @@ namespace Avalonia.Animation new Setter { Property = Visual.OpacityProperty, - Value = 0.0 + Value = 0d } ) { - Cue = new Cue(1.0) + Cue = new Cue(1d) } }; _fadeInAnimation = new Animation @@ -52,11 +52,11 @@ namespace Avalonia.Animation new Setter { Property = Visual.OpacityProperty, - Value = 0.0 + Value = 0d } ) { - Cue = new Cue(0.0) + Cue = new Cue(0d) } }; _fadeOutAnimation.Duration = _fadeInAnimation.Duration = duration; diff --git a/src/Avalonia.Visuals/Animation/PageSlide.cs b/src/Avalonia.Visuals/Animation/PageSlide.cs index d6245a39fe..23e52f90ac 100644 --- a/src/Avalonia.Visuals/Animation/PageSlide.cs +++ b/src/Avalonia.Visuals/Animation/PageSlide.cs @@ -86,22 +86,22 @@ namespace Avalonia.Animation new Setter { Property = translateProperty, - Value = 0.0 + Value = 0d } ) { - Cue = new Cue(0.0) + Cue = new Cue(0d) }, new KeyFrame ( new Setter { Property = translateProperty, - Value = forward ? -distance : distance + Value = forward ? distance : -distance } ) { - Cue = new Cue(1.0) + Cue = new Cue(1d) } }; animation.Duration = Duration; @@ -123,18 +123,18 @@ namespace Avalonia.Animation } ) { - Cue = new Cue(0.0) + Cue = new Cue(0d) }, new KeyFrame ( new Setter { Property = translateProperty, - Value = 0.0 + Value = 0d } ) { - Cue = new Cue(1.0) + Cue = new Cue(1d) }, }; animation.Duration = Duration;