diff --git a/src/providers/twitch/TwitchMessageBuilder.cpp b/src/providers/twitch/TwitchMessageBuilder.cpp index e99f7e59d..72c621c40 100644 --- a/src/providers/twitch/TwitchMessageBuilder.cpp +++ b/src/providers/twitch/TwitchMessageBuilder.cpp @@ -230,6 +230,12 @@ MessagePtr TwitchMessageBuilder::build() // Actually just text QString linkString = this->matchLink(string); + if (string[0] == '@' && app->settings->usernameBold) { + this->emplace(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, diff --git a/src/singletons/Settings.hpp b/src/singletons/Settings.hpp index 3bb7ca5b4..f54dfa7d0 100644 --- a/src/singletons/Settings.hpp +++ b/src/singletons/Settings.hpp @@ -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}; diff --git a/src/widgets/settingspages/HighlightingPage.cpp b/src/widgets/settingspages/HighlightingPage.cpp index 7c8886531..0cbab7c35 100644 --- a/src/widgets/settingspages/HighlightingPage.cpp +++ b/src/widgets/settingspages/HighlightingPage.cpp @@ -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