Browse Source

Add explicit double type marker on values.

Flip the sign on distance to match the correct behavior.
pull/1880/head
Jumar Macato 8 years ago
parent
commit
5e6a6f7e03
No known key found for this signature in database GPG Key ID: B19884DAC3A5BF3F
  1. 8
      src/Avalonia.Visuals/Animation/CrossFade.cs
  2. 14
      src/Avalonia.Visuals/Animation/PageSlide.cs

8
src/Avalonia.Visuals/Animation/CrossFade.cs

@ -38,11 +38,11 @@ namespace Avalonia.Animation
new Setter new Setter
{ {
Property = Visual.OpacityProperty, Property = Visual.OpacityProperty,
Value = 0.0 Value = 0d
} }
) )
{ {
Cue = new Cue(1.0) Cue = new Cue(1d)
} }
}; };
_fadeInAnimation = new Animation _fadeInAnimation = new Animation
@ -52,11 +52,11 @@ namespace Avalonia.Animation
new Setter new Setter
{ {
Property = Visual.OpacityProperty, Property = Visual.OpacityProperty,
Value = 0.0 Value = 0d
} }
) )
{ {
Cue = new Cue(0.0) Cue = new Cue(0d)
} }
}; };
_fadeOutAnimation.Duration = _fadeInAnimation.Duration = duration; _fadeOutAnimation.Duration = _fadeInAnimation.Duration = duration;

14
src/Avalonia.Visuals/Animation/PageSlide.cs

@ -86,22 +86,22 @@ namespace Avalonia.Animation
new Setter new Setter
{ {
Property = translateProperty, Property = translateProperty,
Value = 0.0 Value = 0d
} }
) )
{ {
Cue = new Cue(0.0) Cue = new Cue(0d)
}, },
new KeyFrame new KeyFrame
( (
new Setter new Setter
{ {
Property = translateProperty, Property = translateProperty,
Value = forward ? -distance : distance Value = forward ? distance : -distance
} }
) )
{ {
Cue = new Cue(1.0) Cue = new Cue(1d)
} }
}; };
animation.Duration = Duration; animation.Duration = Duration;
@ -123,18 +123,18 @@ namespace Avalonia.Animation
} }
) )
{ {
Cue = new Cue(0.0) Cue = new Cue(0d)
}, },
new KeyFrame new KeyFrame
( (
new Setter new Setter
{ {
Property = translateProperty, Property = translateProperty,
Value = 0.0 Value = 0d
} }
) )
{ {
Cue = new Cue(1.0) Cue = new Cue(1d)
}, },
}; };
animation.Duration = Duration; animation.Duration = Duration;

Loading…
Cancel
Save