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
+2 -1
View File
@@ -285,7 +285,8 @@ void Emojis::loadEmojiSet()
}
QString url = urlPrefix + code + ".png";
emoji->emote = std::make_shared<Emote>(Emote{
EmoteName{emoji->value}, ImageSet{Image::fromUrl({url}, 0.35)},
EmoteName{emoji->value},
ImageSet{Image::fromUrl({url}, 0.35, {64, 64})},
Tooltip{":" + emoji->shortCodes[0] + ":<br/>Emoji"}, Url{}});
}
});