always display picture in compact view, possibly replacing missing picture by placeholder

This commit is contained in:
csoler 2020-10-03 17:56:24 +02:00
parent 780ffe3504
commit 5e3dab62fd

View File

@ -369,10 +369,8 @@ void BoardPostDisplayWidget_compact::setup()
ui->pictureLabel->setFixedSize(16/9.0*desired_height,desired_height);
ui->pictureLabel->setPicture(pixmap);
}
else if (mPost.mImage.mData == NULL)
ui->pictureLabel->hide();
else
ui->pictureLabel->show();
ui->pictureLabel->setPicture( FilesDefs::getPixmapFromQtResourcePath(":/images/thumb-default.png") );
}
@ -487,11 +485,11 @@ void BoardPostDisplayWidget_card::setup()
}else{
ui->pictureLabel->setPixmap(pixmap);
}
ui->pictureLabel->show();
}
else if (mPost.mImage.mData == NULL)
pictureLabel()->hide();
else
pictureLabel()->show();
ui->pictureLabel->hide();
QTextDocument doc;
doc.setHtml(notes()->text());