mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -04:00
added to check pixmap width & height before scale, only scale when needed
This commit is contained in:
parent
dcddda81f3
commit
21cf49a009
1 changed files with 5 additions and 2 deletions
|
@ -53,7 +53,10 @@ void PhotoView::setPixmap(const QPixmap& pixmap)
|
|||
{
|
||||
QPixmap sqpixmap = pixmap.scaled(640,480, Qt::KeepAspectRatio, Qt::SmoothTransformation);
|
||||
|
||||
if(pixmap.width() > 800 || pixmap.height() > 700)
|
||||
ui->photoLabel->setPixmap(sqpixmap);
|
||||
else
|
||||
ui->photoLabel->setPixmap(pixmap);
|
||||
}
|
||||
|
||||
void PhotoView::setTitle(const QString& text)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue