mirror of
https://github.com/RetroShare/RetroShare.git
synced 2024-10-01 02:35:48 -04:00
Removed size limit inside image viewer, because QT already limits the window size to the 2/3 of screen size
This commit is contained in:
parent
83b18509e2
commit
91b03064b9
@ -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();
|
||||
}
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user