Added new variant to the compact chat style with colored nicknames calculated from the name.

It's disabled by default. You can enable it with the define COLORED_NICKNAMES in ChatStyle.cpp.

git-svn-id: http://svn.code.sf.net/p/retroshare/code/trunk@4884 b45a01b8-16f6-495d-af2f-9b41ad6348cc
This commit is contained in:
thunder2 2012-02-03 21:43:09 +00:00
parent a1806bb04f
commit d3e2eb1f54
14 changed files with 146 additions and 75 deletions

View file

@ -309,6 +309,10 @@ void ChatWidget::addChatMsg(bool incoming, const QString &name, const QDateTime
type = incoming ? ChatStyle::FORMATMSG_INCOMING : ChatStyle::FORMATMSG_OUTGOING;
}
if (chatType == TYPE_SYSTEM) {
formatFlag |= CHAT_FORMATMSG_SYSTEM;
}
QString formatMsg = chatStyle.formatMessage(type, name, incoming ? sendTime : recvTime, message, formatFlag);
ui->textBrowser->append(formatMsg);