From 6c2fd039592add30ad487fc7278cd2c53b826b61 Mon Sep 17 00:00:00 2001 From: Paulb23 Date: Tue, 21 Sep 2021 20:07:12 +0100 Subject: [PATCH] Added search colors to TextEdit and CodeEdit theme --- doc/classes/CodeEdit.xml | 6 ++++++ doc/classes/TextEdit.xml | 6 ++++++ scene/resources/default_theme/default_theme.cpp | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 93f72d45ae2..d856990ff8c 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -671,6 +671,12 @@ Sets the [StyleBox] when [member TextEdit.editable] is disabled. + + [Color] of the border around text that matches the search query. + + + [Color] behind the text that matches the search query. + Sets the highlight [Color] of text selections. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index abb41195841..6a38c1a117e 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -1212,6 +1212,12 @@ Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled. + + [Color] of the border around text that matches the search query. + + + [Color] behind the text that matches the search query. + Sets the highlight [Color] of text selections. diff --git a/scene/resources/default_theme/default_theme.cpp b/scene/resources/default_theme/default_theme.cpp index fa3824e6eb6..7346b6efc7b 100644 --- a/scene/resources/default_theme/default_theme.cpp +++ b/scene/resources/default_theme/default_theme.cpp @@ -438,6 +438,8 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("caret_color", "TextEdit", control_font_color); theme->set_color("caret_background_color", "TextEdit", Color(0, 0, 0)); theme->set_color("word_highlighted_color", "TextEdit", Color(0.8, 0.9, 0.9, 0.15)); + theme->set_color("search_result_color", "TextEdit", Color(0.3, 0.3, 0.3)); + theme->set_color("search_result_border_color", "TextEdit", Color(0.3, 0.3, 0.3, 0.4)); theme->set_constant("line_spacing", "TextEdit", 4 * scale); theme->set_constant("outline_size", "TextEdit", 0); @@ -483,6 +485,8 @@ void fill_default_theme(Ref &theme, const Ref &default_font, const theme->set_color("line_number_color", "CodeEdit", Color(0.67, 0.67, 0.67, 0.4)); theme->set_color("word_highlighted_color", "CodeEdit", Color(0.8, 0.9, 0.9, 0.15)); theme->set_color("line_length_guideline_color", "CodeEdit", Color(0.3, 0.5, 0.8, 0.1)); + theme->set_color("search_result_color", "CodeEdit", Color(0.3, 0.3, 0.3)); + theme->set_color("search_result_border_color", "CodeEdit", Color(0.3, 0.3, 0.3, 0.4)); theme->set_constant("completion_lines", "CodeEdit", 7); theme->set_constant("completion_max_width", "CodeEdit", 50);