Skip to content
GitLab
Menu
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Donald Haase
Cockatrice
Commits
9b7f488b
Commit
9b7f488b
authored
Jan 17, 2015
by
poixen
Browse files
Merge pull request #559 from poixen/chatnamehighlight
Fixed #557
parents
7ef5f2d3
e4afd9fa
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/chatview.cpp
View file @
9b7f488b
...
@@ -171,16 +171,15 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
...
@@ -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
()))
{
char
Format
.
setFontWeight
(
QFont
::
Bold
);
message
Format
.
setFontWeight
(
QFont
::
Bold
);
char
Format
.
setForeground
(
QBrush
(
QColor
(
255
,
120
,
0
)));
message
Format
.
setForeground
(
QBrush
(
QColor
(
255
,
120
,
0
)));
}
}
}
}
if
(
!
message
.
isEmpty
())
if
(
!
message
.
isEmpty
())
cursor
.
insertText
(
message
,
char
Format
);
cursor
.
insertText
(
message
,
message
Format
);
if
(
atBottom
)
if
(
atBottom
)
verticalScrollBar
()
->
setValue
(
verticalScrollBar
()
->
maximum
());
verticalScrollBar
()
->
setValue
(
verticalScrollBar
()
->
maximum
());
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment