diff options
author | Nao Pross <np@0hm.ch> | 2022-11-17 01:09:08 +0100 |
---|---|---|
committer | Nao Pross <np@0hm.ch> | 2022-11-17 01:11:01 +0100 |
commit | 2a499ba6ebf466a9d089409a12b565cbcf62b6ad (patch) | |
tree | c2ec4cd4371d64f06a26e2675ba0469acece8720 /muddle/gui.py | |
parent | Add link to Qt bug (diff) | |
download | Muddle-2a499ba6ebf466a9d089409a12b565cbcf62b6ad.tar.gz Muddle-2a499ba6ebf466a9d089409a12b565cbcf62b6ad.zip |
Add switch button to gui and set monspace font in logs
Diffstat (limited to 'muddle/gui.py')
-rw-r--r-- | muddle/gui.py | 8 |
1 files changed, 7 insertions, 1 deletions
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): |