mirror of
https://github.com/RetroShare/RetroShare.git
synced 2025-06-07 06:02:41 -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
2 changed files with 2 additions and 11 deletions
|
@ -51,17 +51,7 @@ PhotoView::~PhotoView()
|
||||||
|
|
||||||
void PhotoView::setPixmap(const QPixmap& pixmap)
|
void PhotoView::setPixmap(const QPixmap& pixmap)
|
||||||
{
|
{
|
||||||
QPixmap sqpixmap;
|
ui->photoLabel->setPixmap(pixmap);
|
||||||
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);
|
|
||||||
}
|
|
||||||
this->adjustSize();
|
this->adjustSize();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,6 +32,7 @@ void AspectRatioPixmapLabel::setPixmap ( const QPixmap & p)
|
||||||
{
|
{
|
||||||
pix = p;
|
pix = p;
|
||||||
QLabel::setPixmap(pix);
|
QLabel::setPixmap(pix);
|
||||||
|
//std::cout << "Information size: " << pix.width() << 'x' << pix.height() << std::endl;
|
||||||
}
|
}
|
||||||
|
|
||||||
int AspectRatioPixmapLabel::heightForWidth( int width ) const
|
int AspectRatioPixmapLabel::heightForWidth( int width ) const
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue