Merge pull request #1719 from csoler/v0.6-ImprovedGUI

fixed size problem in channel feed items
This commit is contained in:
csoler 2019-11-26 22:04:50 +01:00 committed by GitHub
commit 7fa63f9342
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -396,19 +396,21 @@ void GxsChannelPostItem::fill()
{
QPixmap thumbnail;
ui->logoLabel->setScaledContents(true);
GxsIdDetails::loadPixmapFromData(mPost.mThumbnail.mData, mPost.mThumbnail.mSize, thumbnail,GxsIdDetails::ORIGINAL);
// Wiping data - as its been passed to thumbnail.
if( thumbnail.width() < 90 ){
ui->logoLabel->setMaximumSize(82*f,108*f);
}
else if( thumbnail.width() < 109 ){
ui->logoLabel->setMinimumSize(108*f,108*f);
ui->logoLabel->setMaximumSize(108*f,108*f);
}
else{
ui->logoLabel->setMinimumSize(156*f,108*f);
ui->logoLabel->setMaximumSize(156*f,108*f);
}
// if( thumbnail.width() < 90 ){
// ui->logoLabel->setMaximumSize(82*f,108*f);
// }
// else if( thumbnail.width() < 109 ){
// ui->logoLabel->setMinimumSize(108*f,108*f);
// ui->logoLabel->setMaximumSize(108*f,108*f);
// }
// else{
// ui->logoLabel->setMinimumSize(156*f,108*f);
// ui->logoLabel->setMaximumSize(156*f,108*f);
// }
ui->logoLabel->setPixmap(thumbnail);
}