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,
msg = {'text': text}
if type == LogType.ERROR:
msg['color'] = 'white'
msg['bgcolor'] = '#e46269'
msg['bgcolor'] = '#c45259'
elif type == LogType.WARNING:
msg['color'] = '#ffd966'
msg['bgcolor'] = 'orange'
msg['color'] = 'white'
msg['bgcolor'] = '#c4a347'
else:
msg['color'] = 'blue'
msg['bgcolor'] = 'white'
html_text = """<body>
<div style='color:%(color)s; background-color:%(bgcolor)s'>
%(text)s
<div style='color:%(color)s'>
<strong>%(text)s</strong>
</div>
</body>"""
tracking_box.setHtml(html_text % msg)
tracking_box.setStyleSheet(f"background-color: {msg['bgcolor']}")
# parent.update()
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