diff --git a/igniter/RobotoMono-Regular.ttf b/igniter/RobotoMono-Regular.ttf new file mode 100644 index 0000000000..7c4ce36a44 Binary files /dev/null and b/igniter/RobotoMono-Regular.ttf differ diff --git a/igniter/bootstrap_repos.py b/igniter/bootstrap_repos.py index b1495432bd..fe649c8148 100644 --- a/igniter/bootstrap_repos.py +++ b/igniter/bootstrap_repos.py @@ -83,7 +83,23 @@ class BootstrapRepos(): if not os.path.exists(temp_zip): self._log.error("make archive failed.") return None - shutil.move(temp_zip, self.data_dir) + + destination = os.path.join( + self.data_dir, os.path.basename(temp_zip)) + + if os.path.exists(destination): + self._log.warning( + f"Destination file {destination} exists, removing.") + try: + os.remove(destination) + except Exception as e: + self._log.error(e) + return None + try: + shutil.move(temp_zip, self.data_dir) + except shutil.Error as e: + self._log.error(e) + return None return os.path.join(self.data_dir, os.path.basename(temp_zip)) def _create_pype_zip( diff --git a/igniter/install_dialog.py b/igniter/install_dialog.py index 8327aaa8fc..b7c8e1ddaa 100644 --- a/igniter/install_dialog.py +++ b/igniter/install_dialog.py @@ -33,16 +33,21 @@ class InstallDialog(QtWidgets.QDialog): # style for normal console text self.default_console_style = QtGui.QTextCharFormat() - self.default_console_style.setFontPointSize(0.1) + # self.default_console_style.setFontPointSize(0.1) self.default_console_style.setForeground( QtGui.QColor.fromRgb(72, 200, 150)) # style for error console text self.error_console_style = QtGui.QTextCharFormat() - self.error_console_style.setFontPointSize(0.1) + # self.error_console_style.setFontPointSize(0.1) self.error_console_style.setForeground( QtGui.QColor.fromRgb(184, 54, 19)) + f_id = QtGui.QFontDatabase.addApplicationFont( + os.path.join( + os.path.dirname(__file__), 'RobotoMono-Regular.ttf') + ) + self._init_ui() def _init_ui(self): @@ -163,8 +168,8 @@ class InstallDialog(QtWidgets.QDialog): """QPlainTextEdit { background-color: rgb(32, 32, 32); color: rgb(72, 200, 150); - font-family: Courier; - font-size: 3pt; + font-family: "Roboto Mono"; + font-size: 0.5em; } QScrollBar:vertical { border: 1px solid rgb(61, 115, 97);