From aaacd150a521ffa689f889fca0dd8fc200b99da0 Mon Sep 17 00:00:00 2001 From: Pato05 Date: Thu, 2 May 2024 17:10:01 +0200 Subject: [PATCH] fix lyrics text not centered --- lib/ui/lyrics_screen.dart | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/ui/lyrics_screen.dart b/lib/ui/lyrics_screen.dart index 099b840..40561d6 100644 --- a/lib/ui/lyrics_screen.dart +++ b/lib/ui/lyrics_screen.dart @@ -136,9 +136,8 @@ class _LyricsWidgetState extends State //Lyric height, screen height, appbar height final actualHeight = height + (_showTranslation ? additionalTranslationHeight : 0.0); - // _currentIndex + 1 because there's also the initial one - final minScroll = actualHeight * (_currentIndex + 1); - double scrollTo = minScroll + height / 2; + // _currentIndex + 1 because there's also the initial one (though we need to sum half) + var scrollTo = actualHeight * (_currentIndex + 1); if (scrollTo < 0.0) scrollTo = 0.0; if (scrollTo > _controller.position.maxScrollExtent) {