1
0
mirror of https://github.com/qTox/qTox.git synced 2024-03-22 14:00:36 +08:00

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.
This commit is contained in:
Chiitoo 2016-03-08 22:19:47 +02:00
parent 1eb68542df
commit 7b8e947acd
2 changed files with 10 additions and 6 deletions

View File

@ -247,5 +247,5 @@ QString ChatMessage::detectQuotes(const QString& str, MessageType type)
QString ChatMessage::wrapDiv(const QString &str, const QString &div) QString ChatMessage::wrapDiv(const QString &str, const QString &div)
{ {
return QString("<div class=%1>%2</div>").arg(div, str); return QString("<p class=%1>%2</p>").arg(div, /*QChar(0x200E) + */QString(str));
} }

View File

@ -1,14 +1,18 @@
div.msg { p {
white-space: pre-wrap;
}
p.msg {
color: @black; color: @black;
font: @big; font: @big;
} }
div.action { p.action {
color: #1818FF; color: #1818FF;
font: @big; font: @big;
} }
div.typing { p.typing {
color: @mediumGreyLight; color: @mediumGreyLight;
font: @big; font: @big;
} }
@ -17,7 +21,7 @@ span.quote {
color: #279419; color: #279419;
} }
div.alert { p.alert {
margin-left: 0px; margin-left: 0px;
margin-right: 0px; margin-right: 0px;
color: @black; color: @black;
@ -25,7 +29,7 @@ div.alert {
font: @big; font: @big;
} }
div.alert_name { p.alert_name {
color: @black; color: @black;
background-color: @orange; background-color: @orange;
font: @bigBold; font: @bigBold;