LyricsView: Message for when MediaPlayer isn't running

This commit is contained in:
Jaidyn Ann 2022-06-25 12:32:16 -05:00
parent f67161ff12
commit 59044460e5

View File

@ -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);