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
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 4 additions and 3 deletions

View file

@ -106,7 +106,7 @@
- Bugfix: Fixed popup windows not persisting between restarts. (#5081)
- Bugfix: Fixed splits not retaining their focus after minimizing. (#5080)
- Bugfix: Fixed _Copy message_ copying the channel name in global search. (#5106)
- Bugfix: Fixed some Twitch emotes sizes being wrong at certain zoom levels. (#5279)
- Bugfix: Fixed some Twitch emotes sizes being wrong at certain zoom levels. (#5279, #5291)
- Bugfix: Fixed a missing space when the image uploader provided a delete link. (#5269)
- Bugfix: Reply contexts now use the color of the replied-to message. (#5145)
- Bugfix: Fixed top-level window getting stuck after opening settings. (#5161, #5166)

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"},
});