From b75c2b6d763a37b9fcd900243649cb8bbe91deb8 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Sat, 24 Aug 2019 14:33:55 +0100 Subject: Adjust viewport colour based on background colour --- scene/gui/text_edit.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'scene/gui') 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++) { -- cgit v1.2.3