From 02277b2442290108455a0e841f7bdcc30596df52 Mon Sep 17 00:00:00 2001 From: Matt Lowe Date: Sat, 24 Jan 2015 23:43:28 +0100 Subject: [PATCH] Removed other user mention BG Due to feedback, I have removed the background color for other user mentions. I think this looks cleaner, and doesnt require an additional option. --- cockatrice/src/chatview.cpp | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/cockatrice/src/chatview.cpp b/cockatrice/src/chatview.cpp index 5d85f58c..7ded65ff 100644 --- a/cockatrice/src/chatview.cpp +++ b/cockatrice/src/chatview.cpp @@ -12,7 +12,6 @@ #include "userlist.h" #include "tab_userlists.h" -const QColor OTHER_USER_MENTION_COLOR = QColor(145, 210, 255); // light blue const QColor MENTION_COLOR = QColor(190, 25, 85); // maroon const QColor OTHER_USER_COLOR = QColor(0, 65, 255); // dark blue @@ -32,7 +31,6 @@ ChatView::ChatView(const TabSupervisor *_tabSupervisor, TabGame *_game, bool _sh mentionFormatOtherUser.setFontWeight(QFont::Bold); mentionFormatOtherUser.setForeground(Qt::blue); - mentionFormatOtherUser.setBackground(QBrush(OTHER_USER_MENTION_COLOR)); mentionFormatOtherUser.setAnchor(true); viewport()->setCursor(Qt::IBeamCursor); @@ -190,8 +188,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use if (settingsCache->getChatMention()) { index = 0; - from = 0; - while((index = message.indexOf('@', from)) != -1) { + while((index = message.indexOf('@')) != -1) { cursor.insertText(message.left(index), defaultFormat); message = message.mid(index); if (message.isEmpty())