mirror of
https://github.com/Cockatrice/Cockatrice.git
synced 2026-04-27 07:48:01 -07:00
Updated chatview texts
This is enforcing a new client wide color scheme. RULES + Green = Major server message (Welcome to chat room, change phase...) + Red = Minor server message (timestamps, game actions...) + Blue = Key word + Blue with modifier (underline/italics) = Keyword that can be interacted with. + Black = User text + key numbers are now blue. player drew X cards, looks at the top X cards, places X counters on . . . and so on. + card names are now italic (different from urls now) I did have the player names set to blue also, but it felt like too much. Player names in phase change are blue Updates + Updated username colors in phases to match other areas of client Small update + Made server message in chat room bold + made User names in chat/pm match the weight of in-game (consistancy)
This commit is contained in:
parent
98c92733ac
commit
e0839db648
4 changed files with 29 additions and 22 deletions
|
|
@ -89,6 +89,7 @@ void ChatView::appendCardTag(QTextCursor &cursor, const QString &cardName)
|
|||
anchorFormat.setForeground(Qt::blue);
|
||||
anchorFormat.setAnchor(true);
|
||||
anchorFormat.setAnchorHref("card://" + cardName);
|
||||
anchorFormat.setFontItalic(true);
|
||||
|
||||
cursor.setCharFormat(anchorFormat);
|
||||
cursor.insertText(cardName);
|
||||
|
|
@ -122,7 +123,9 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
|
|||
|
||||
if (showTimestamps && !sameSender) {
|
||||
QTextCharFormat timeFormat;
|
||||
timeFormat.setForeground(Qt::black);
|
||||
timeFormat.setForeground(QColor(SERVER_MESSAGE_COLOR));
|
||||
if (sender.isEmpty())
|
||||
timeFormat.setFontWeight(QFont::Bold);
|
||||
cursor.setCharFormat(timeFormat);
|
||||
cursor.insertText(QDateTime::currentDateTime().toString("[hh:mm:ss] "));
|
||||
}
|
||||
|
|
@ -153,8 +156,10 @@ void ChatView::appendMessage(QString message, QString sender, UserLevelFlags use
|
|||
cursor.insertText(" ");
|
||||
|
||||
QTextCharFormat messageFormat;
|
||||
if (sender.isEmpty())
|
||||
if (sender.isEmpty()) {
|
||||
messageFormat.setForeground(Qt::darkGreen);
|
||||
messageFormat.setFontWeight(QFont::Bold);
|
||||
}
|
||||
cursor.setCharFormat(messageFormat);
|
||||
|
||||
int from = 0, index = 0, bracket = 0, at = 0;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue