From 59044460e53668f44cbcbd0eb79f0136c262a252 Mon Sep 17 00:00:00 2001 From: Jaidyn Ann Date: Sat, 25 Jun 2022 12:32:16 -0500 Subject: [PATCH] LyricsView: Message for when MediaPlayer isn't running --- src/LyricsView.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/LyricsView.cpp b/src/LyricsView.cpp index 8d27d45..ce0673c 100644 --- a/src/LyricsView.cpp +++ b/src/LyricsView.cpp @@ -184,7 +184,7 @@ LyricsView::Pulse() BString lyrics; song.Lyrics(&lyrics); fTextView->SetText(lyrics.String()); - SetInactive(false); + SetInactive(lyrics.IsEmpty()); } if (fAutoScroll) { @@ -236,9 +236,12 @@ LyricsView::SetInactive(bool inactive) else if (!inactive && fScrollView->IsHidden()) fScrollView->Show(); - if (inactive) { + if (inactive && fMediaPlayer->IsValid()) { fTextView->SetText("No lyrics to display!"); fTextView->SetAlignment(B_ALIGN_CENTER); + } else if (inactive) { + fTextView->SetText("No targeted MediaPlayer!"); + fTextView->SetAlignment(B_ALIGN_CENTER); } else fTextView->SetAlignment(B_ALIGN_LEFT);