- updated the new shortcut list with the shortcuts added lately

- now the special messages in the Shell are color coded according to the level. Before they all were RED. Now the WARNINGS are yellow, ERRORS are red and SUCCESS is a dark green. Also the level is in CAPS LOCK to make them more obvious
- some more changes to GUI interface (solved issues)
- added some status bar messages in the Geometry Editor to guide the user when using the Geometry Tools
- now the '`' shortcut key that shows the 'shortcut key list' in Editors points to the same window which is created in a tab no longer as a pop-up window. This tab can be detached if needed.
This commit is contained in:
Marius Stanciu
2019-02-03 15:13:09 +02:00
committed by Marius S
parent e5ebfac3ce
commit 6ea3499d39
22 changed files with 428 additions and 409 deletions

View File

@@ -234,7 +234,7 @@ class TermWidget(QWidget):
"""
Convert text to HTML for inserting it to browser
"""
assert style in ('in', 'out', 'err')
assert style in ('in', 'out', 'err', 'warning', 'success')
text = html.escape(text)
text = text.replace('\n', '<br/>')
@@ -243,6 +243,10 @@ class TermWidget(QWidget):
text = '<span style="font-weight: bold;">%s</span>' % text
elif style == 'err':
text = '<span style="font-weight: bold; color: red;">%s</span>' % text
elif style == 'warning':
text = '<span style="font-weight: bold; color: rgb(244, 182, 66);">%s</span>' % text
elif style == 'success':
text = '<span style="font-weight: bold; color: rgb(8, 68, 0);">%s</span>' % text
else:
text = '<span>%s</span>' % text # without span <br/> is ignored!!!
@@ -304,6 +308,16 @@ class TermWidget(QWidget):
"""
self._append_to_browser('out', text)
def append_success(self, text):
"""Appent text to output widget
"""
self._append_to_browser('success', text)
def append_warning(self, text):
"""Appent text to output widget
"""
self._append_to_browser('warning', text)
def append_error(self, text):
"""Appent error text to output widget. Text is drawn with red background
"""