Improve formatting whe we have no album info
This commit is contained in:
committed by
craig.p.drummond
parent
5056dfd8cd
commit
879585251f
@@ -254,8 +254,8 @@ void AlbumView::updateDetails(bool preservePos)
|
||||
details.clear();
|
||||
}
|
||||
int pos=preservePos ? text->verticalScrollBar()->value() : 0;
|
||||
if (detailsReceived&ArtistBio) {
|
||||
text->setText(pic+details+"<br>"+trackList);
|
||||
if (detailsReceived&ArtistBio && !details.isEmpty()) {
|
||||
text->setText(pic+"<br>"+details+"<br>"+trackList);
|
||||
} else {
|
||||
text->setText(pic+trackList);
|
||||
}
|
||||
|
||||
@@ -266,7 +266,7 @@ void ArtistView::handleSimilarReply()
|
||||
|
||||
void ArtistView::setBio()
|
||||
{
|
||||
QString html=pic+biography;
|
||||
QString html=pic+"<br>"+biography;
|
||||
if (!similarArtists.isEmpty()) {
|
||||
html+=similarArtists;
|
||||
}
|
||||
|
||||
@@ -103,7 +103,7 @@ QString View::createPicTag(const QImage &img, const QString &file)
|
||||
return QString();
|
||||
}
|
||||
if (!file.isEmpty() && QFile::exists(file)) {
|
||||
return QString("<img src=\"%1\"><br><br>").arg(file);
|
||||
return QString("<img src=\"%1\"><br>").arg(file);
|
||||
}
|
||||
// No filename given, or file does not exist - therefore ecnode & scale image.
|
||||
return encode(img.scaled(text->picSize(), Qt::KeepAspectRatio, Qt::SmoothTransformation));
|
||||
|
||||
Reference in New Issue
Block a user