From 2b128c4f90d62ff4a13cbc8f3804d4531eef7419 Mon Sep 17 00:00:00 2001 From: AlexanderDotH Date: Tue, 6 Jun 2023 22:13:35 +0200 Subject: [PATCH] feat(lyrics): sync --- .../Frontend/View/Custom/NewLyricsScroller.axaml.cs | 5 +++-- .../View/Custom/Tile/Overlays/NoteOverlay.axaml.cs | 12 +++++++++--- 2 files changed, 12 insertions(+), 5 deletions(-) diff --git a/OpenLyricsClient/Frontend/View/Custom/NewLyricsScroller.axaml.cs b/OpenLyricsClient/Frontend/View/Custom/NewLyricsScroller.axaml.cs index 979cb73..63d8d2f 100644 --- a/OpenLyricsClient/Frontend/View/Custom/NewLyricsScroller.axaml.cs +++ b/OpenLyricsClient/Frontend/View/Custom/NewLyricsScroller.axaml.cs @@ -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); } diff --git a/OpenLyricsClient/Frontend/View/Custom/Tile/Overlays/NoteOverlay.axaml.cs b/OpenLyricsClient/Frontend/View/Custom/Tile/Overlays/NoteOverlay.axaml.cs index 77a3eb9..3b8b251 100644 --- a/OpenLyricsClient/Frontend/View/Custom/Tile/Overlays/NoteOverlay.axaml.cs +++ b/OpenLyricsClient/Frontend/View/Custom/Tile/Overlays/NoteOverlay.axaml.cs @@ -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); @@ -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); } }