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:
commit
cca1425b43
|
@ -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>");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user