fixed image resizing for channel thumbnails. Apparently there is a bug in Qt preventing Qt::KeepAspectRatioByExpanding to work correctly

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@6800 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
csoler 2013-10-04 19:40:29 +00:00
parent b49ba8b98f
commit a9290e9dd7

View File

@ -279,7 +279,8 @@ QPixmap misc::getOpenThumbnailedPicture(QWidget *parent, const QString &caption,
if (!getOpenFileName(parent, RshareSettings::LASTDIR_IMAGES, caption, tr("Pictures (*.png *.xpm *.jpg *.tiff *.gif)"), fileName))
return QPixmap();
return QPixmap(fileName).scaled(width, height, Qt::IgnoreAspectRatio, Qt::SmoothTransformation);
return QPixmap(fileName).scaledToHeight(height).copy( 0, 0, width, height);
//return QPixmap(fileName).scaledToHeight(width, height, Qt::KeepAspectRatioByExpanding, Qt::SmoothTransformation);
}
bool misc::getOpenFileName(QWidget *parent, RshareSettings::enumLastDir type, const QString &caption, const QString &filter, QString &file)