소스 검색

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

UI: Render tabs and spaces in Log Viewer
Jim 5 년 전
부모
커밋
529c0cf2a3
1개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 3 1
      UI/log-viewer.cpp

+ 3 - 1
UI/log-viewer.cpp

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