mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-05-12 02:55:18 -04:00
attempt to fix issues with pictures which width are bigger to fit on Label
This commit is contained in:
parent
b1f45536a2
commit
b333a96da2
2 changed files with 15 additions and 2 deletions
|
@ -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…
Add table
Add a link
Reference in a new issue