mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
Fixed using non existant 2x and 3x versions of ffz emotes and badges
This commit is contained in:
parent
2143a8caac
commit
23f1ec9ac2
|
@ -213,7 +213,7 @@ ImagePtr Image::fromUrl(const Url &url, qreal scale)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// Warn("same image loaded multiple times: {}", url.string);
|
qDebug() << "same image loaded multiple times:" << url.string;
|
||||||
}
|
}
|
||||||
|
|
||||||
return shared;
|
return shared;
|
||||||
|
|
|
@ -21,8 +21,10 @@ ImageSet::ImageSet(const ImagePtr &image1, const ImagePtr &image2,
|
||||||
|
|
||||||
ImageSet::ImageSet(const Url &image1, const Url &image2, const Url &image3)
|
ImageSet::ImageSet(const Url &image1, const Url &image2, const Url &image3)
|
||||||
: imageX1_(Image::fromUrl(image1, 1))
|
: imageX1_(Image::fromUrl(image1, 1))
|
||||||
, imageX2_(Image::fromUrl(image2, 0.5))
|
, imageX2_(image2.string.isEmpty() ? Image::getEmpty()
|
||||||
, imageX3_(Image::fromUrl(image3, 0.25))
|
: Image::fromUrl(image2, 0.5))
|
||||||
|
, imageX3_(image3.string.isEmpty() ? Image::getEmpty()
|
||||||
|
: Image::fromUrl(image3, 0.25))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -32,8 +32,11 @@ namespace {
|
||||||
//, code, tooltip
|
//, code, tooltip
|
||||||
emoteData.name = name;
|
emoteData.name = name;
|
||||||
emoteData.images =
|
emoteData.images =
|
||||||
ImageSet{Image::fromUrl(url1x, 1), Image::fromUrl(url2x, 0.5),
|
ImageSet{Image::fromUrl(url1x, 1),
|
||||||
Image::fromUrl(url3x, 0.25)};
|
url2x.string.isEmpty() ? Image::getEmpty()
|
||||||
|
: Image::fromUrl(url2x, 0.5),
|
||||||
|
url3x.string.isEmpty() ? Image::getEmpty()
|
||||||
|
: Image::fromUrl(url3x, 0.25)};
|
||||||
emoteData.tooltip = {tooltip};
|
emoteData.tooltip = {tooltip};
|
||||||
}
|
}
|
||||||
EmotePtr cachedOrMake(Emote &&emote, const EmoteId &id)
|
EmotePtr cachedOrMake(Emote &&emote, const EmoteId &id)
|
||||||
|
|
Loading…
Reference in a new issue