Skip to content

Commit

Permalink
Add a "header warning" style for warnings in the header
Browse files Browse the repository at this point in the history
  • Loading branch information
mvanderkamp authored and inducer committed Sep 30, 2021
1 parent e389d24 commit 8826d8b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions pudb/debugger.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
5 changes: 5 additions & 0 deletions pudb/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
# }}}
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
Expand Down Expand Up @@ -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"),
# }}}
Expand Down Expand Up @@ -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"),
# }}}
Expand Down

0 comments on commit 8826d8b

Please sign in to comment.