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 +++++++- muddle/muddle.ui | 48 +++++++++++++++++++++++++++++++++++++----------- 2 files changed, 44 insertions(+), 12 deletions(-) (limited to 'muddle') 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): diff --git a/muddle/muddle.ui b/muddle/muddle.ui index f849116..9d5a307 100644 --- a/muddle/muddle.ui +++ b/muddle/muddle.ui @@ -150,7 +150,7 @@ Moodle - + @@ -158,13 +158,6 @@ - - - - true - - - @@ -172,6 +165,13 @@ + + + + true + + + @@ -179,7 +179,7 @@ - + false @@ -189,6 +189,13 @@ + + + + SWITCH Login + + + @@ -197,7 +204,7 @@ Muddle - + @@ -221,6 +228,9 @@ + + false + Not set @@ -231,6 +241,9 @@ + + false + Always start GUI @@ -239,6 +252,19 @@ + + + + Qt::Vertical + + + + 20 + 40 + + + + @@ -248,7 +274,7 @@ 0 0 600 - 23 + 24 -- cgit v1.2.1