diff options
author | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-09-24 01:15:24 +0200 |
---|---|---|
committer | Hugo Locurcio <hugo.locurcio@hugo.pro> | 2021-09-24 01:15:36 +0200 |
commit | cae492562b90efc537e65752d627f90a06229348 (patch) | |
tree | 4a3b5d49b910d51443869827d63ba4a078464271 /editor/debugger/script_editor_debugger.cpp | |
parent | 01f692c173b9926ae764a4a4c9a54c266a21272b (diff) |
Color error and warning lines in the editor debugger's Errors panel
This improves readability when some errors/warnings are unfolded,
as their stack traces will keep their original colors.
Diffstat (limited to 'editor/debugger/script_editor_debugger.cpp')
-rw-r--r-- | editor/debugger/script_editor_debugger.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/editor/debugger/script_editor_debugger.cpp b/editor/debugger/script_editor_debugger.cpp index 5fda1c76ef..ab857dc3ad 100644 --- a/editor/debugger/script_editor_debugger.cpp +++ b/editor/debugger/script_editor_debugger.cpp @@ -501,6 +501,10 @@ void ScriptEditorDebugger::_parse_message(const String &p_msg, const Array &p_da error->set_text(0, time); error->set_text_align(0, TreeItem::ALIGN_LEFT); + const Color color = get_theme_color(oe.warning ? SNAME("warning_color") : SNAME("error_color"), SNAME("Editor")); + error->set_custom_color(0, color); + error->set_custom_color(1, color); + String error_title; if (oe.callstack.size() > 0) { // If available, use the script's stack in the error title. |