Bold @username

This commit is contained in:
apa420 2018-07-04 12:22:01 +02:00 committed by fourtf
parent acf77beff2
commit 318e8b6234
3 changed files with 12 additions and 0 deletions

View file

@ -230,6 +230,12 @@ MessagePtr TwitchMessageBuilder::build()
// Actually just text
QString linkString = this->matchLink(string);
if (string[0] == '@' && app->settings->usernameBold) {
this->emplace<TextElement>(string, MessageElement::Text, textColor,
FontStyle::ChatMediumBold);
string = "";
}
Link link;
if (linkString.isEmpty()) {
@ -509,6 +515,8 @@ void TwitchMessageBuilder::parseHighlights()
this->message->flags |= Message::Highlighted;
}
}
for (const HighlightPhrase &highlight : activeHighlights) {
}
}
void TwitchMessageBuilder::appendTwitchEmote(const Communi::IrcMessage *ircMessage,

View file

@ -108,6 +108,8 @@ public:
BoolSetting inlineWhispers = {"/whispers/enableInlineWhispers", true};
BoolSetting usernameBold = {"/appearence/messages/boldUsernames", false};
/// External tools
// Streamlink
BoolSetting streamlinkUseCustomPath = {"/external/streamlink/useCustomPath", false};

View file

@ -24,6 +24,7 @@
#define PLAY_SOUND "Play sound when your name is mentioned"
#define FLASH_TASKBAR "Flash taskbar when your name is mentioned"
#define ALWAYS_PLAY "Always play highlight sound (Even if Chatterino is focused)"
#define USERNAME_BOLD "Make @username bold"
namespace chatterino {
@ -104,6 +105,7 @@ HighlightingPage::HighlightingPage()
}
layout.append(createCheckBox(ALWAYS_PLAY, app->settings->highlightAlwaysPlaySound));
layout.append(createCheckBox(USERNAME_BOLD, app->settings->usernameBold));
}
// ---- misc