fix: use 3x scale factor for base size multiplier (#5291)

This commit is contained in:
pajlada
2024-04-01 20:51:12 +02:00
committed by GitHub
parent 905aa4e923
commit 2a447d3c95
2 changed files with 4 additions and 3 deletions
+3 -2
View File
@@ -439,13 +439,14 @@ EmotePtr TwitchEmotes::getOrCreateEmote(const EmoteId &id,
if (!shared)
{
auto baseSize = getEmoteExpectedBaseSize(id);
auto emote3xScaleFactor = getEmote3xScaleFactor(id);
(*cache)[id] = shared = std::make_shared<Emote>(Emote{
EmoteName{name},
ImageSet{
Image::fromUrl(getEmoteLink(id, "1.0"), 1, baseSize),
Image::fromUrl(getEmoteLink(id, "2.0"), 0.5, baseSize * 2),
Image::fromUrl(getEmoteLink(id, "3.0"),
getEmote3xScaleFactor(id), baseSize * 4),
Image::fromUrl(getEmoteLink(id, "3.0"), emote3xScaleFactor,
baseSize * (1.0 / emote3xScaleFactor)),
},
Tooltip{name.toHtmlEscaped() + "<br>Twitch Emote"},
});