diff --git a/ui/browsing/nowplayingpage.go b/ui/browsing/nowplayingpage.go index 63c94ec..5fd124c 100644 --- a/ui/browsing/nowplayingpage.go +++ b/ui/browsing/nowplayingpage.go @@ -86,13 +86,15 @@ func NewNowPlayingPage( canShare bool, lrcLibEnabled bool, ) *NowPlayingPage { + state := nowPlayingPageState{ + conf: conf, contr: contr, pool: pool, sm: sm, im: im, pm: pm, mp: mp, canRate: canRate, canShare: canShare, lrcLib: lrcLibEnabled, + } if page, ok := pool.Obtain(util.WidgetTypeNowPlayingPage).(*NowPlayingPage); ok && page != nil { + page.nowPlayingPageState = state page.Reload() return page } - a := &NowPlayingPage{nowPlayingPageState: nowPlayingPageState{ - conf: conf, contr: contr, pool: pool, sm: sm, im: im, pm: pm, mp: mp, canRate: canRate, canShare: canShare, lrcLib: lrcLibEnabled, - }} + a := &NowPlayingPage{nowPlayingPageState: state} a.ExtendBaseWidget(a) pm.OnPaused(a.formatStatusLine) diff --git a/ui/widgets/lyricsviewer.go b/ui/widgets/lyricsviewer.go index 053d044..90fb8a7 100644 --- a/ui/widgets/lyricsviewer.go +++ b/ui/widgets/lyricsviewer.go @@ -50,7 +50,7 @@ func (l *LyricsViewer) SetLyrics(lyrics *mediaprovider.Lyrics) { if l.viewer == nil { l.viewer = fynelyrics.NewLyricsViewer() - l.viewer.ActiveLyricPosition = fynelyrics.ActiveLyricPositionMiddle + l.viewer.ActiveLyricPosition = fynelyrics.ActiveLyricPositionUpperMiddle l.viewer.InactiveLyricColorName = theme.ColorNameInactiveLyric } lines := make([]string, len(lyrics.Lines))