UI: Render tabs and spaces in Log Viewer

This commit is contained in:
Matt Gajownik 2020-08-20 09:39:05 +10:00
parent c3c3f98033
commit 92b1980c0a

View File

@ -133,7 +133,9 @@ void OBSLogViewer::AddLine(int type, const QString &str)
QTextCursor newCursor = textArea->textCursor();
newCursor.movePosition(QTextCursor::End);
newCursor.insertHtml(msg + QStringLiteral("<br>"));
newCursor.insertHtml(
QStringLiteral("<pre style=\"white-space: pre-wrap\">") + msg +
QStringLiteral("<br></pre>"));
if (bottomScrolled)
scroll->setValue(scroll->maximum());