added font for console

This commit is contained in:
Ondrej Samohel 2020-09-16 12:16:18 +02:00
parent 3fe4300ca3
commit 44cde1cbc3
No known key found for this signature in database
GPG key ID: 8A29C663C672C2B7
3 changed files with 26 additions and 5 deletions

Binary file not shown.

View file

@ -83,7 +83,23 @@ class BootstrapRepos():
if not os.path.exists(temp_zip):
self._log.error("make archive failed.")
return None
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(

View file

@ -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);