From b1f45536a223254e1ca4caf80941c39b61ddc6c7 Mon Sep 17 00:00:00 2001 From: defnax Date: Mon, 13 Jan 2020 15:36:55 +0100 Subject: [PATCH] added temporary solution to not stretch the pixmap out of the window --- retroshare-gui/src/gui/Posted/PhotoView.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/retroshare-gui/src/gui/Posted/PhotoView.cpp b/retroshare-gui/src/gui/Posted/PhotoView.cpp index dba09a239..25e8ad92f 100644 --- a/retroshare-gui/src/gui/Posted/PhotoView.cpp +++ b/retroshare-gui/src/gui/Posted/PhotoView.cpp @@ -48,7 +48,9 @@ PhotoView::~PhotoView() void PhotoView::setPixmap(const QPixmap& pixmap) { - ui->photoLabel->setPixmap(pixmap); + QPixmap sqpixmap = pixmap.scaled(600,480, Qt::KeepAspectRatio, Qt::SmoothTransformation); + + ui->photoLabel->setPixmap(sqpixmap); } void PhotoView::setTitle(const QString& text)