瀏覽代碼

Merged jpcgt/flatcam:Beta into uenz1/flatcam:FixTclCommandDrillcncjob

Andre Spahlinger 5 年之前
父節點
當前提交
4674227e63
共有 3 個文件被更改,包括 13 次插入5 次删除
  1. 9 3
      appTools/ToolShell.py
  2. 3 1
      setup_ubuntu.sh
  3. 1 1
      tclCommands/TclCommandNew.py

+ 9 - 3
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:

+ 3 - 1
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

+ 1 - 1
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)