From 2a499ba6ebf466a9d089409a12b565cbcf62b6ad Mon Sep 17 00:00:00 2001 From: Nao Pross Date: Thu, 17 Nov 2022 01:09:08 +0100 Subject: Add switch button to gui and set monspace font in logs --- muddle/gui.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'muddle/gui.py') diff --git a/muddle/gui.py b/muddle/gui.py index 6c533fc..5ea34f8 100644 --- a/muddle/gui.py +++ b/muddle/gui.py @@ -324,6 +324,12 @@ class MuddleWindow(QMainWindow): self.loghandler.newLogMessage.connect(self.onNewLogMessage) logging.getLogger("muddle").addHandler(self.loghandler) + ## Set font to be monospaced + f = QFont("_monospace") + f.setStyleHint(QFont.StyleHint.Monospace) + self.logsTab = self.findChild(QPlainTextEdit, "logsTab") + self.logsTab.setFont(f) + # moodle tab ## set up proxymodel for moodle treeview self.moodleTreeModel = MoodleTreeModel() @@ -430,7 +436,7 @@ class MuddleWindow(QMainWindow): @pyqtSlot(str) def onNewLogMessage(self, msg): - self.findChild(QPlainTextEdit, "logsTab").appendPlainText(msg) + self.logsTab.appendPlainText(msg) @pyqtSlot() def onDownloadPathEditEditingFinished(self): -- cgit v1.2.1