Skip to content

Commit

Permalink
feat(lyrics): sync
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexanderDotH committed Jun 6, 2023
1 parent a6cb88b commit 2b128c4
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -107,9 +107,10 @@ private void UiThreadRenderTimerOnTick(TimeSpan obj)
y = SmoothAnimator.Lerp(
this._currentScrollOffset,
this._nextScrollOffset,
(int)obj.Milliseconds, this.Speed, EnumAnimationStyle.CIRCULAREASEOUT);
(int)obj.Milliseconds, this.Speed, EnumAnimationStyle.SIGMOID);
}
else if (!this.IsSynced && this._isSyncing || this.IsSynced && !this._isSyncing && this._nextScrollOffset < y)
else if (!this.IsSynced && this._isSyncing ||
this.IsSynced && !this._isSyncing && this._nextScrollOffset < y)
{
y = CalcResyncStep(this._currentScrollOffset, this._nextScrollOffset, this.Speed);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -212,13 +212,19 @@ private Style IdleAnimationStyle(string className, TimeSpan duration, TimeSpan d
var keyFrame1 = new KeyFrame
{
Cue = new Cue(0),
Setters = { new Setter(TextBlock.OpacityProperty, 0.2) }
Setters =
{
new Setter(TextBlock.OpacityProperty, 0.2)
}
};

var keyFrame2 = new KeyFrame
{
Cue = new Cue(1),
Setters = { new Setter(TextBlock.OpacityProperty, 1) }
Setters =
{
new Setter(TextBlock.OpacityProperty, 1)
}
};

animation.Children.Add(keyFrame1);
Expand Down Expand Up @@ -482,7 +488,7 @@ public Size Size
{
get
{
return new Size(this._size.Width, this._height + 5);
return new Size(this._size.Width, this._height);
}
}

Expand Down

0 comments on commit 2b128c4

Please sign in to comment.