mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-08-03 11:54:30 -04:00
added pan/zoom for channel post image
This commit is contained in:
parent
9e20c04e3f
commit
4472f1cef4
5 changed files with 234 additions and 69 deletions
|
@ -307,7 +307,11 @@ QPixmap misc::getOpenThumbnailedPicture(QWidget *parent, const QString &caption,
|
|||
if (!getOpenFileName(parent, RshareSettings::LASTDIR_IMAGES, caption, tr("Pictures (*.png *.jpeg *.xpm *.jpg *.tiff *.gif)"), fileName))
|
||||
return QPixmap();
|
||||
|
||||
return QPixmap(fileName).scaledToHeight(height, Qt::SmoothTransformation).copy( 0, 0, width, height);
|
||||
if(width > 0 && height > 0)
|
||||
return QPixmap(fileName).scaledToHeight(height, Qt::SmoothTransformation).copy( 0, 0, width, height);
|
||||
else
|
||||
return QPixmap(fileName);
|
||||
|
||||
//return QPixmap(fileName).scaledToHeight(width, height, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue