From b81fc3c78d66ccbc5d30fe78d99cf5882d1978a6 Mon Sep 17 00:00:00 2001 From: ldam <ldam@passcal.nmt.edu> Date: Tue, 16 May 2023 15:08:20 -0600 Subject: [PATCH] adjust color, text style for tracking box; make background-color fill the whole box instead of highlighting the text only --- sohstationviewer/controller/util.py | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/sohstationviewer/controller/util.py b/sohstationviewer/controller/util.py index 85c8203f7..0e46a24ab 100644 --- a/sohstationviewer/controller/util.py +++ b/sohstationviewer/controller/util.py @@ -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() -- GitLab