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
ceead6b9
Commit
ceead6b9
authored
Jan 26, 2015
by
Gavin Bisesi
Browse files
Merge pull request #593 from poixen/other_user_mention_option
Removed other user mention BG
parents
c328f28c
02277b24
Changes
1
Hide whitespace changes
Inline
Side-by-side
cockatrice/src/chatview.cpp
View file @
ceead6b9
...
@@ -12,7 +12,6 @@
...
@@ -12,7 +12,6 @@
#include
"userlist.h"
#include
"userlist.h"
#include
"tab_userlists.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
MENTION_COLOR
=
QColor
(
190
,
25
,
85
);
// maroon
const
QColor
OTHER_USER_COLOR
=
QColor
(
0
,
65
,
255
);
// dark blue
const
QColor
OTHER_USER_COLOR
=
QColor
(
0
,
65
,
255
);
// dark blue
...
@@ -32,7 +31,6 @@ ChatView::ChatView(const TabSupervisor *_tabSupervisor, TabGame *_game, bool _sh
...
@@ -32,7 +31,6 @@ ChatView::ChatView(const TabSupervisor *_tabSupervisor, TabGame *_game, bool _sh
mentionFormatOtherUser
.
setFontWeight
(
QFont
::
Bold
);
mentionFormatOtherUser
.
setFontWeight
(
QFont
::
Bold
);
mentionFormatOtherUser
.
setForeground
(
Qt
::
blue
);
mentionFormatOtherUser
.
setForeground
(
Qt
::
blue
);
mentionFormatOtherUser
.
setBackground
(
QBrush
(
OTHER_USER_MENTION_COLOR
));
mentionFormatOtherUser
.
setAnchor
(
true
);
mentionFormatOtherUser
.
setAnchor
(
true
);
viewport
()
->
setCursor
(
Qt
::
IBeamCursor
);
viewport
()
->
setCursor
(
Qt
::
IBeamCursor
);
...
@@ -190,8 +188,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
...
@@ -190,8 +188,7 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
if
(
settingsCache
->
getChatMention
())
{
if
(
settingsCache
->
getChatMention
())
{
index
=
0
;
index
=
0
;
from
=
0
;
while
((
index
=
message
.
indexOf
(
'@'
))
!=
-
1
)
{
while
((
index
=
message
.
indexOf
(
'@'
,
from
))
!=
-
1
)
{
cursor
.
insertText
(
message
.
left
(
index
),
defaultFormat
);
cursor
.
insertText
(
message
.
left
(
index
),
defaultFormat
);
message
=
message
.
mid
(
index
);
message
=
message
.
mid
(
index
);
if
(
message
.
isEmpty
())
if
(
message
.
isEmpty
())
...
...
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