mirror of
https://github.com/Chatterino/chatterino2.git
synced 2024-11-13 19:49:51 +01:00
fixed < in emote names breaking the <br> and tooltips on mac
This commit is contained in:
parent
92cc1f354b
commit
1eb256bd4e
|
@ -542,14 +542,17 @@ void EmoteManager::loadFFZEmotes()
|
||||||
// emoteName is used for giving a name to the emote in case it doesn't exist
|
// emoteName is used for giving a name to the emote in case it doesn't exist
|
||||||
util::EmoteData EmoteManager::getTwitchEmoteById(long id, const QString &emoteName)
|
util::EmoteData EmoteManager::getTwitchEmoteById(long id, const QString &emoteName)
|
||||||
{
|
{
|
||||||
return _twitchEmoteFromCache.getOrAdd(id, [this, &emoteName, &id] {
|
QString _emoteName = emoteName;
|
||||||
|
_emoteName.replace("<", "<");
|
||||||
|
|
||||||
|
return _twitchEmoteFromCache.getOrAdd(id, [this, &emoteName, &_emoteName, &id] {
|
||||||
util::EmoteData newEmoteData;
|
util::EmoteData newEmoteData;
|
||||||
newEmoteData.image1x = new LazyLoadedImage(GetTwitchEmoteLink(id, "1.0"), 1, emoteName,
|
newEmoteData.image1x = new LazyLoadedImage(GetTwitchEmoteLink(id, "1.0"), 1, emoteName,
|
||||||
emoteName + "<br/>Twitch Emote 1x");
|
_emoteName + "<br/>Twitch Emote 1x");
|
||||||
newEmoteData.image2x = new LazyLoadedImage(GetTwitchEmoteLink(id, "2.0"), .5, emoteName,
|
newEmoteData.image2x = new LazyLoadedImage(GetTwitchEmoteLink(id, "2.0"), .5, emoteName,
|
||||||
emoteName + "<br/>Twitch Emote 2x");
|
_emoteName + "<br/>Twitch Emote 2x");
|
||||||
newEmoteData.image3x = new LazyLoadedImage(GetTwitchEmoteLink(id, "3.0"), .25, emoteName,
|
newEmoteData.image3x = new LazyLoadedImage(GetTwitchEmoteLink(id, "3.0"), .25, emoteName,
|
||||||
emoteName + "<br/>Twitch Emote 3x");
|
_emoteName + "<br/>Twitch Emote 3x");
|
||||||
|
|
||||||
return newEmoteData;
|
return newEmoteData;
|
||||||
});
|
});
|
||||||
|
|
|
@ -19,6 +19,7 @@ TooltipWidget::TooltipWidget(BaseWidget *parent)
|
||||||
palette.setColor(QPalette::WindowText, white);
|
palette.setColor(QPalette::WindowText, white);
|
||||||
palette.setColor(QPalette::Background, black);
|
palette.setColor(QPalette::Background, black);
|
||||||
this->setPalette(palette);
|
this->setPalette(palette);
|
||||||
|
this->displayText->setStyleSheet("color: #ffffff");
|
||||||
this->setWindowOpacity(0.8);
|
this->setWindowOpacity(0.8);
|
||||||
this->setFont(singletons::FontManager::getInstance().getFont(singletons::FontManager::Type::MediumSmall,
|
this->setFont(singletons::FontManager::getInstance().getFont(singletons::FontManager::Type::MediumSmall,
|
||||||
this->getDpiMultiplier()));
|
this->getDpiMultiplier()));
|
||||||
|
@ -27,6 +28,7 @@ TooltipWidget::TooltipWidget(BaseWidget *parent)
|
||||||
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
|
this->setWindowFlags(Qt::FramelessWindowHint | Qt::WindowStaysOnTopHint);
|
||||||
|
|
||||||
displayText->setAlignment(Qt::AlignHCenter);
|
displayText->setAlignment(Qt::AlignHCenter);
|
||||||
|
displayText->setText("lmao xD");
|
||||||
auto layout = new QVBoxLayout();
|
auto layout = new QVBoxLayout();
|
||||||
layout->setContentsMargins(10, 5, 10, 5);
|
layout->setContentsMargins(10, 5, 10, 5);
|
||||||
layout->addWidget(displayText);
|
layout->addWidget(displayText);
|
||||||
|
|
Loading…
Reference in a new issue