Wrap chat lines into div default
authorunC0Rr
Sat, 28 Sep 2024 22:27:13 +0200
changeset 16066 2b4f361e3891
parent 16049 9be943326d9c
Wrap chat lines into div
QTfrontend/ui/widget/chatwidget.cpp
--- a/QTfrontend/ui/widget/chatwidget.cpp	Wed Aug 28 13:41:51 2024 +0200
+++ b/QTfrontend/ui/widget/chatwidget.cpp	Sat Sep 28 22:27:13 2024 +0200
@@ -471,9 +471,9 @@
             HWApplication::alert(this, 800);
     }
 
-    chatStrings.append(line);
+    chatStrings.append(QStringLiteral("<div>%1</div>").arg(line));
 
-    chatText->setHtml("<html><body>"+chatStrings.join("<br>")+"</body></html>");
+    chatText->setHtml("<html><body>"+chatStrings.join("")+"</body></html>");
 
     afterContentAdd();
 }
@@ -487,7 +487,7 @@
 
     chatStrings.append("<hr>" + str + "<hr>");
 
-    chatText->setHtml("<html><body>"+chatStrings.join("<br>")+"</body></html>");
+    chatText->setHtml("<html><body>"+chatStrings.join("")+"</body></html>");
 
     afterContentAdd();
 }