From 91b03064b9c9f10eaec4d9dee9da1bc52c54d977 Mon Sep 17 00:00:00 2001 From: hunbernd Date: Tue, 21 Jan 2020 22:11:13 +0100 Subject: [PATCH] Removed size limit inside image viewer, because QT already limits the window size to the 2/3 of screen size --- retroshare-gui/src/gui/Posted/PhotoView.cpp | 12 +----------- retroshare-gui/src/util/AspectRatioPixmapLabel.cpp | 1 + 2 files changed, 2 insertions(+), 11 deletions(-) diff --git a/retroshare-gui/src/gui/Posted/PhotoView.cpp b/retroshare-gui/src/gui/Posted/PhotoView.cpp index 3cbf261cd..ee572dfac 100644 --- a/retroshare-gui/src/gui/Posted/PhotoView.cpp +++ b/retroshare-gui/src/gui/Posted/PhotoView.cpp @@ -51,17 +51,7 @@ PhotoView::~PhotoView() void PhotoView::setPixmap(const QPixmap& pixmap) { - QPixmap sqpixmap; - if(pixmap.width() > 800 ){ - QPixmap sqpixmap = pixmap.scaled(640,480, Qt::KeepAspectRatio, Qt::SmoothTransformation); - ui->photoLabel->setPixmap(sqpixmap); - }else if (pixmap.height() > 600){ - QPixmap sqpixmap = pixmap.scaled(480,640, Qt::KeepAspectRatio, Qt::SmoothTransformation); - ui->photoLabel->setPixmap(sqpixmap); - } - else{ - ui->photoLabel->setPixmap(pixmap); - } + ui->photoLabel->setPixmap(pixmap); this->adjustSize(); } diff --git a/retroshare-gui/src/util/AspectRatioPixmapLabel.cpp b/retroshare-gui/src/util/AspectRatioPixmapLabel.cpp index 49fc9697b..08ecf18c6 100644 --- a/retroshare-gui/src/util/AspectRatioPixmapLabel.cpp +++ b/retroshare-gui/src/util/AspectRatioPixmapLabel.cpp @@ -32,6 +32,7 @@ void AspectRatioPixmapLabel::setPixmap ( const QPixmap & p) { pix = p; QLabel::setPixmap(pix); + //std::cout << "Information size: " << pix.width() << 'x' << pix.height() << std::endl; } int AspectRatioPixmapLabel::heightForWidth( int width ) const