mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-12-26 07:59:35 -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
@ -309,8 +309,14 @@ void PostedCardView::fill()
|
||||
// Wiping data - as its been passed to thumbnail.
|
||||
|
||||
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);
|
||||
|
||||
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