Merge pull request #6855 from raldone01/fix/cropped_thumbnails

Keep aspect ratio for thumbnails
This commit is contained in:
Matthieu Gallien 2024-08-20 15:15:52 +02:00 committed by GitHub
commit 3d9ed8a7bd
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -251,6 +251,7 @@ void ShellExtensionsServer::processThumbnailRequest(QLocalSocket *socket, const
queryItems.addQueryItem(QStringLiteral("fileId"), record._fileId);
queryItems.addQueryItem(QStringLiteral("x"), QString::number(thumbnailRequestInfo.size.width()));
queryItems.addQueryItem(QStringLiteral("y"), QString::number(thumbnailRequestInfo.size.height()));
queryItems.addQueryItem(QStringLiteral("a"), QStringLiteral("true")); // Keep aspect ratio
const QUrl jobUrl = Utility::concatUrlPath(folder->accountState()->account()->url(), getFetchThumbnailPath(), queryItems);
const auto job = new SimpleNetworkJob(folder->accountState()->account());
job->startRequest(QByteArrayLiteral("GET"), jobUrl);