summaryrefslogtreecommitdiffstats
path: root/scene/gui/text_edit.cpp
diff options
context:
space:
mode:
authorMika Viskari <miv391@gmail.com>2023-11-16 19:36:23 +0200
committerMika Viskari <miv391@gmail.com>2023-12-07 16:26:08 +0200
commit609eb8bc016bebdc698cb8bf8d8a076c5d92c9a7 (patch)
treec2637ac69c6beeb374e3bd01bc23dde3ebaf4ae1 /scene/gui/text_edit.cpp
parent56a2b143a2d8868fdbaba798b7b0145516397f48 (diff)
downloadredot-engine-609eb8bc016bebdc698cb8bf8d8a076c5d92c9a7.tar.gz
Highlight error lines in minimap
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r--scene/gui/text_edit.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 86e726d9da..5817f70343 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -770,7 +770,14 @@ void TextEdit::_notification(int p_what) {
Dictionary color_map = _get_line_syntax_highlighting(minimap_line);
Color line_background_color = text.get_line_background_color(minimap_line);
- line_background_color.a *= 0.6;
+
+ if (line_background_color != theme_cache.background_color) {
+ // Make non-default background colors more visible, such as error markers.
+ line_background_color.a = 1.0;
+ } else {
+ line_background_color.a *= 0.6;
+ }
+
Color current_color = theme_cache.font_color;
if (!editable) {
current_color = theme_cache.font_readonly_color;