diff options
author | Paulb23 <p_batty@hotmail.co.uk> | 2019-08-24 14:33:55 +0100 |
---|---|---|
committer | Paulb23 <p_batty@hotmail.co.uk> | 2019-08-24 14:33:55 +0100 |
commit | b75c2b6d763a37b9fcd900243649cb8bbe91deb8 (patch) | |
tree | 412463ee7a35f8d687eca34dbc4a79cad65d8e31 /scene/gui/text_edit.cpp | |
parent | 57589a767dcb52063bd891eb8cb8544829278bbf (diff) |
Adjust viewport colour based on background colour
Diffstat (limited to 'scene/gui/text_edit.cpp')
-rw-r--r-- | scene/gui/text_edit.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index f8c31121be..1bd23cd132 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -918,8 +918,7 @@ void TextEdit::_notification(int p_what) { int minimap_draw_amount = minimap_visible_lines + times_line_wraps(minimap_line + 1); // draw the minimap - Color viewport_color = cache.current_line_color; - viewport_color.a /= 2; + Color viewport_color = (cache.background_color.get_v() < 0.5) ? Color(1, 1, 1, 0.1) : Color(0, 0, 0, 0.1); VisualServer::get_singleton()->canvas_item_add_rect(ci, Rect2((xmargin_end + 2), viewport_offset_y, cache.minimap_width, viewport_height), viewport_color); for (int i = 0; i < minimap_draw_amount; i++) { |