mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-01-26 07:16:11 -05:00
attempt to improve
This commit is contained in:
parent
21cf49a009
commit
f8f77f122e
@ -51,12 +51,17 @@ PhotoView::~PhotoView()
|
||||
|
||||
void PhotoView::setPixmap(const QPixmap& pixmap)
|
||||
{
|
||||
QPixmap sqpixmap = pixmap.scaled(640,480, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
if(pixmap.width() > 800 || pixmap.height() > 700)
|
||||
QPixmap sqpixmap;
|
||||
if(pixmap.width() > 800 ){
|
||||
QPixmap sqpixmap = pixmap.scaled(640,480, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
ui->photoLabel->setPixmap(sqpixmap);
|
||||
else
|
||||
}else if (pixmap.height() > 600){
|
||||
QPixmap sqpixmap = pixmap.scaled(480,640, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
ui->photoLabel->setPixmap(sqpixmap);
|
||||
}
|
||||
else{
|
||||
ui->photoLabel->setPixmap(pixmap);
|
||||
}
|
||||
}
|
||||
|
||||
void PhotoView::setTitle(const QString& text)
|
||||
@ -102,5 +107,6 @@ void PhotoView::copyMessageLink()
|
||||
QList<RetroShareLink> urls;
|
||||
urls.push_back(link);
|
||||
RSLinkClipboard::copyLinks(urls);
|
||||
QMessageBox::information(NULL,tr("information"),tr("The Retrohare link was copied to your clipboard.")) ;
|
||||
}
|
||||
}
|
||||
|
@ -308,15 +308,13 @@ void PostedCardView::fill()
|
||||
GxsIdDetails::loadPixmapFromData(mPost.mImage.mData, mPost.mImage.mSize, pixmap,GxsIdDetails::ORIGINAL);
|
||||
// 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
|
||||
QPixmap scaledpixmap;
|
||||
if(pixmap.width() > 800){
|
||||
QPixmap scaledpixmap = pixmap.scaledToWidth(800, Qt::SmoothTransformation);
|
||||
ui->pictureLabel->setPixmap(scaledpixmap);
|
||||
}else{
|
||||
ui->pictureLabel->setPixmap(pixmap);
|
||||
|
||||
}
|
||||
}
|
||||
else if (mPost.mImage.mData == NULL)
|
||||
{
|
||||
|
@ -321,13 +321,13 @@ void PostedItem::fill()
|
||||
ui->thumbnailLabel->setPixmap(sqpixmap);
|
||||
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
|
||||
QPixmap scaledpixmap;
|
||||
if(pixmap.width() > 800){
|
||||
QPixmap scaledpixmap = pixmap.scaledToWidth(800, Qt::SmoothTransformation);
|
||||
ui->pictureLabel->setPixmap(scaledpixmap);
|
||||
}else{
|
||||
ui->pictureLabel->setPixmap(pixmap);
|
||||
|
||||
}
|
||||
}
|
||||
else if (urlOkay && (mPost.mImage.mData == NULL))
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user