Merge pull request #3295 from WizardCM/log-viewer-tabs-spaces

UI: Render tabs and spaces in Log Viewer
master
Jim 2020-08-20 11:24:58 -07:00 committed by GitHub
commit 529c0cf2a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

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());