commit
9b7f488bd7
1 changed files with 3 additions and 4 deletions
|
@ -171,16 +171,15 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
|
||||||
from = 1;
|
from = 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
QTextCharFormat charFormat;
|
|
||||||
if (settingsCache->getChatMention()) {
|
if (settingsCache->getChatMention()) {
|
||||||
if (message.toLower().contains("@" + QString::fromStdString(tabSupervisor->getUserInfo()->name()).toLower())) {
|
if (message.toLower().contains("@" + QString::fromStdString(tabSupervisor->getUserInfo()->name()).toLower())) {
|
||||||
charFormat.setFontWeight(QFont::Bold);
|
messageFormat.setFontWeight(QFont::Bold);
|
||||||
charFormat.setForeground(QBrush(QColor(255, 120, 0)));
|
messageFormat.setForeground(QBrush(QColor(255, 120, 0)));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!message.isEmpty())
|
if (!message.isEmpty())
|
||||||
cursor.insertText(message, charFormat);
|
cursor.insertText(message, messageFormat);
|
||||||
|
|
||||||
if (atBottom)
|
if (atBottom)
|
||||||
verticalScrollBar()->setValue(verticalScrollBar()->maximum());
|
verticalScrollBar()->setValue(verticalScrollBar()->maximum());
|
||||||
|
|
Loading…
Reference in a new issue