Estimate size of images to avoid layout shifts (#5192)

This commit is contained in:
nerix
2024-02-25 18:19:20 +01:00
committed by GitHub
parent 0cfd25ce8e
commit f285ada36c
13 changed files with 145 additions and 70 deletions
+1 -1
View File
@@ -463,7 +463,7 @@ ImageSet SeventvEmotes::createImageSet(const QJsonObject &emoteData)
auto image = Image::fromUrl(
{QString("https:%1/%2").arg(baseUrl, file["name"].toString())},
scale);
scale, {static_cast<int>(width), file["height"].toInt(16)});
sizes.at(nextSize) = image;
nextSize++;