From 8826d8b2b138e9996dc6665fee228583256cf400 Mon Sep 17 00:00:00 2001 From: Michael van der Kamp Date: Wed, 29 Sep 2021 19:03:04 -0600 Subject: [PATCH] Add a "header warning" style for warnings in the header --- pudb/debugger.py | 4 ++-- pudb/theme.py | 5 +++++ 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/pudb/debugger.py b/pudb/debugger.py index df7c1bc6..69809ca7 100644 --- a/pudb/debugger.py +++ b/pudb/debugger.py @@ -2620,12 +2620,12 @@ def interaction(self, exc_tuple, show_exc_dialog=True): caption.extend([ (None, " "), - ("warning", "[POST-MORTEM MODE]") + ("header warning", "[POST-MORTEM MODE]") ]) elif exc_tuple is not None: caption.extend([ (None, " "), - ("warning", "[PROCESSING EXCEPTION - hit 'e' to examine]") + ("header warning", "[PROCESSING EXCEPTION - hit 'e' to examine]") ]) self.caption.set_text(caption) diff --git a/pudb/theme.py b/pudb/theme.py index 39f7a120..f00e8b2b 100644 --- a/pudb/theme.py +++ b/pudb/theme.py @@ -107,6 +107,7 @@ def handle_256_colors(self): "fixed value": "label", "warning": "highlighted", + "header warning": "warning", "search box": "focused input", "search not found": "warning", # }}} @@ -362,6 +363,7 @@ def link(child: str, parent: str): "input": ("black", "dark cyan"), "focused input": ("black", "light cyan"), "warning": (add_setting("dark red", "bold"), "white"), + "header warning": (add_setting("dark red", "bold"), "light gray"), # }}} # {{{ source view "source": ("black", "white"), @@ -423,6 +425,7 @@ def link(child: str, parent: str): "header": ("dark blue", "light gray"), "dialog title": (add_setting("white", "bold"), "black"), "warning": (add_setting("light red", "bold"), "black"), + "warning": (add_setting("light red", "bold"), "light gray"), # }}} # {{{ source view "source": ("white", "black"), @@ -475,6 +478,7 @@ def link(child: str, parent: str): "focused sidebar": (add_setting("black", "bold"), "light gray"), "group head": (add_setting("black", "bold"), "light gray"), "warning": (add_setting("light red", "bold"), "black"), + "header warning": (add_setting("light red", "bold"), "light gray"), "dialog title": ("black", "dark green"), "fixed value": ("white", "dark gray"), # }}} @@ -533,6 +537,7 @@ def link(child: str, parent: str): # {{{ general ui "dialog title": (add_setting("white", "bold"), "dark cyan"), "warning": (add_setting("light red", "bold"), "white"), + "header warning": (add_setting("light red", "bold"), "light gray"), "focused sidebar": ("dark red", "light gray"), "group head": (add_setting("yellow", "bold"), "light gray"), # }}}