Allow colors in server chatlogs

This commit is contained in:
Crystalwarrior 2019-12-28 05:47:33 +03:00
parent 7518ed8a00
commit 59e8a72a50

View File

@ -2296,7 +2296,7 @@ void Courtroom::append_ic_text(QString p_text, QString p_name, bool is_songchang
const int old_scrollbar_value = ui_ic_chatlog->verticalScrollBar()->value(); const int old_scrollbar_value = ui_ic_chatlog->verticalScrollBar()->value();
if (!is_songchange) if (!is_songchange)
p_text = filter_ic_text(p_text, false); p_text = filter_ic_text(p_text, true, -1, m_chatmessage[TEXT_COLOR].toInt());
if (log_goes_downwards) if (log_goes_downwards)
{ {
@ -2322,7 +2322,7 @@ void Courtroom::append_ic_text(QString p_text, QString p_name, bool is_songchang
else else
{ {
ui_ic_chatlog->textCursor().insertText(": ", normal); ui_ic_chatlog->textCursor().insertText(": ", normal);
ui_ic_chatlog->textCursor().insertText(p_text, normal); ui_ic_chatlog->textCursor().insertHtml(p_text);
} }
// If we got too many blocks in the current log, delete some from the top. // If we got too many blocks in the current log, delete some from the top.