From 7b8e947acd9b563e0d54dba7b1b9ed3948a61c4c Mon Sep 17 00:00:00 2001 From: Chiitoo Date: Tue, 8 Mar 2016 22:19:47 +0200 Subject: [PATCH] Chatlog: Adjust whitespace behaviour/handling. Allow for strings of whitespace characters to be displayed in chat messages without them being truncated. Original work by TheSpiritXIII. --- src/chatlog/chatmessage.cpp | 2 +- ui/chatArea/innerStyle.css | 14 +++++++++----- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/src/chatlog/chatmessage.cpp b/src/chatlog/chatmessage.cpp index d2600f2db..898e46a83 100644 --- a/src/chatlog/chatmessage.cpp +++ b/src/chatlog/chatmessage.cpp @@ -247,5 +247,5 @@ QString ChatMessage::detectQuotes(const QString& str, MessageType type) QString ChatMessage::wrapDiv(const QString &str, const QString &div) { - return QString("
%2
").arg(div, str); + return QString("

%2

").arg(div, /*QChar(0x200E) + */QString(str)); } diff --git a/ui/chatArea/innerStyle.css b/ui/chatArea/innerStyle.css index a1bbb3a13..7128be85e 100644 --- a/ui/chatArea/innerStyle.css +++ b/ui/chatArea/innerStyle.css @@ -1,14 +1,18 @@ -div.msg { +p { + white-space: pre-wrap; +} + +p.msg { color: @black; font: @big; } -div.action { +p.action { color: #1818FF; font: @big; } -div.typing { +p.typing { color: @mediumGreyLight; font: @big; } @@ -17,7 +21,7 @@ span.quote { color: #279419; } -div.alert { +p.alert { margin-left: 0px; margin-right: 0px; color: @black; @@ -25,7 +29,7 @@ div.alert { font: @big; } -div.alert_name { +p.alert_name { color: @black; background-color: @orange; font: @bigBold;