resize only really big icons
This commit is contained in:
parent
6358e8aa0e
commit
7523940ec0
1 changed files with 10 additions and 6 deletions
|
|
@ -182,9 +182,11 @@ QNetworkReply::NetworkError NetworkFactory::downloadIcon(const QList<QPair<QStri
|
||||||
output = icon_pixmap;
|
output = icon_pixmap;
|
||||||
|
|
||||||
if (!output.isNull()) {
|
if (!output.isNull()) {
|
||||||
output = output.scaled(QSize(48, 48),
|
if (output.width() > 128) {
|
||||||
Qt::AspectRatioMode::KeepAspectRatio,
|
output = output.scaled(QSize(48, 48),
|
||||||
Qt::TransformationMode::SmoothTransformation);
|
Qt::AspectRatioMode::KeepAspectRatio,
|
||||||
|
Qt::TransformationMode::SmoothTransformation);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -228,9 +230,11 @@ QNetworkReply::NetworkError NetworkFactory::downloadIcon(const QList<QPair<QStri
|
||||||
output = icon_pixmap;
|
output = icon_pixmap;
|
||||||
|
|
||||||
if (!output.isNull()) {
|
if (!output.isNull()) {
|
||||||
output = output.scaled(QSize(48, 48),
|
if (output.width() > 128) {
|
||||||
Qt::AspectRatioMode::KeepAspectRatio,
|
output = output.scaled(QSize(48, 48),
|
||||||
Qt::TransformationMode::SmoothTransformation);
|
Qt::AspectRatioMode::KeepAspectRatio,
|
||||||
|
Qt::TransformationMode::SmoothTransformation);
|
||||||
|
}
|
||||||
|
|
||||||
return network_result;
|
return network_result;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue