diff --git a/appTools/ToolShell.py b/appTools/ToolShell.py index 02e093e0..97c94cdc 100644 --- a/appTools/ToolShell.py +++ b/appTools/ToolShell.py @@ -7,7 +7,7 @@ # ########################################################## -from PyQt5.QtCore import Qt +from PyQt5.QtCore import Qt, QSettings from PyQt5.QtGui import QTextCursor, QPixmap from PyQt5.QtWidgets import QVBoxLayout, QWidget, QHBoxLayout, QLabel from appGUI.GUIElements import _BrowserTextEdit, _ExpandableTextEdit, FCLabel @@ -41,7 +41,12 @@ class TermWidget(QWidget): self.app = app self._browser = _BrowserTextEdit(version=version, app=app) - self._browser.setStyleSheet("font: 9pt \"Courier\";") + qsettings = QSettings("Open Source", "FlatCAM") + if qsettings.contains("textbox_font_size"): + tb_fsize = qsettings.value('textbox_font_size', type=int) + else: + tb_fsize = 9 + self._browser.setStyleSheet("font: {0}pt \"Courier\";".format(tb_fsize)) self._browser.setReadOnly(True) self._browser.document().setDefaultStyleSheet( self._browser.document().defaultStyleSheet() + @@ -478,7 +483,8 @@ class FCShell(TermWidget): trc_formated = [] for a in reversed(trc): trc_formated.append(a.replace(" ", " > ").replace("\n", "")) - text = "%s\nPython traceback: %s\n%s" % (exc_value, exc_type, "\n".join(trc_formated)) + text = "%s\nPython traceback: %s\n%s" % ( + exc_value, exc_type, "\n".join(trc_formated)) else: text = "%s" % error else: diff --git a/setup_ubuntu.sh b/setup_ubuntu.sh index fec5b612..cba3ecd5 100644 --- a/setup_ubuntu.sh +++ b/setup_ubuntu.sh @@ -44,6 +44,8 @@ sudo -H python3 -m pip install --upgrade \ qrcode \ pyqt5 \ reportlab \ - svglib + svglib \ + pyserial \ + testresources sudo -H easy_install -U distribute diff --git a/tclCommands/TclCommandNew.py b/tclCommands/TclCommandNew.py index 9a2af1f2..c5f76575 100644 --- a/tclCommands/TclCommandNew.py +++ b/tclCommands/TclCommandNew.py @@ -39,4 +39,4 @@ class TclCommandNew(TclCommand): :return: None or exception """ - self.app.on_file_new(cli=True) + self.app.f_handlers.on_file_new(cli=True)