1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

Merge branch 'pr1336'

This commit is contained in:
tux3 2015-03-04 20:02:01 +01:00
commit cca1425b43
No known key found for this signature in database
GPG Key ID: 7E086DD661263264

View File

@ -461,11 +461,11 @@ void FileTransferWidget::showPreview(const QString &filename)
if (imageSize.width() > maxSize.width() || imageSize.height() > maxSize.height()) if (imageSize.width() > maxSize.width() || imageSize.height() > maxSize.height())
{ {
imageSize.scale(maxSize.width(), maxSize.height(), Qt::KeepAspectRatio); imageSize.scale(maxSize.width(), maxSize.height(), Qt::KeepAspectRatio);
ui->previewLabel->setToolTip("<html><img src="+filename+" width="+QString::number(imageSize.width())+" height="+QString::number(imageSize.height())+"/></html>"); ui->previewLabel->setToolTip("<html><img src="+QUrl::toPercentEncoding(filename)+" width="+QString::number(imageSize.width())+" height="+QString::number(imageSize.height())+"/></html>");
} }
else else
{ {
ui->previewLabel->setToolTip("<html><img src"+filename+"/></html>"); ui->previewLabel->setToolTip("<html><img src"+QUrl::toPercentEncoding(filename)+"/></html>");
} }
} }
} }