mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-27 00:19:25 -05:00
attempt to fix issues with pictures which width are bigger to fit on Label
This commit is contained in:
parent
b1f45536a2
commit
b333a96da2
@ -310,7 +310,13 @@ void PostedCardView::fill()
|
||||
|
||||
QPixmap sqpixmap = pixmap.scaled(desired_width,desired_height, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||
|
||||
QPixmap squaledpixmap = pixmap.scaled(640,480, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
if(pixmap.width() > 800)
|
||||
ui->pictureLabel->setPixmap(squaledpixmap);
|
||||
else
|
||||
ui->pictureLabel->setPixmap(pixmap);
|
||||
|
||||
}
|
||||
else if (mPost.mImage.mData == NULL)
|
||||
{
|
||||
|
@ -319,8 +319,15 @@ void PostedItem::fill()
|
||||
|
||||
QPixmap sqpixmap = pixmap.scaled(desired_width,desired_height, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||
ui->thumbnailLabel->setPixmap(sqpixmap);
|
||||
ui->pictureLabel->setPixmap(pixmap);
|
||||
ui->thumbnailLabel->setToolTip(tr("Click to view Picture"));
|
||||
|
||||
QPixmap squaledpixmap = pixmap.scaled(640,480, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
if(pixmap.width() > 800)
|
||||
ui->pictureLabel->setPixmap(squaledpixmap);
|
||||
else
|
||||
ui->pictureLabel->setPixmap(pixmap);
|
||||
|
||||
}
|
||||
else if (urlOkay && (mPost.mImage.mData == NULL))
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user