Skip to content
Snippets Groups Projects
Commit b81fc3c7 authored by Lan Dam's avatar Lan Dam
Browse files

adjust color, text style for tracking box; make background-color fill the...

adjust color, text style for tracking box; make background-color fill the whole box instead of highlighting the text only
parent a41506c6
No related branches found
No related tags found
1 merge request!127display tracking info when start reading new files
...@@ -66,19 +66,20 @@ def display_tracking_info(tracking_box: QTextBrowser, text: str, ...@@ -66,19 +66,20 @@ def display_tracking_info(tracking_box: QTextBrowser, text: str,
msg = {'text': text} msg = {'text': text}
if type == LogType.ERROR: if type == LogType.ERROR:
msg['color'] = 'white' msg['color'] = 'white'
msg['bgcolor'] = '#e46269' msg['bgcolor'] = '#c45259'
elif type == LogType.WARNING: elif type == LogType.WARNING:
msg['color'] = '#ffd966' msg['color'] = 'white'
msg['bgcolor'] = 'orange' msg['bgcolor'] = '#c4a347'
else: else:
msg['color'] = 'blue' msg['color'] = 'blue'
msg['bgcolor'] = 'white' msg['bgcolor'] = 'white'
html_text = """<body> html_text = """<body>
<div style='color:%(color)s; background-color:%(bgcolor)s'> <div style='color:%(color)s'>
%(text)s <strong>%(text)s</strong>
</div> </div>
</body>""" </body>"""
tracking_box.setHtml(html_text % msg) tracking_box.setHtml(html_text % msg)
tracking_box.setStyleSheet(f"background-color: {msg['bgcolor']}")
# parent.update() # parent.update()
tracking_box.repaint() tracking_box.repaint()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment