summaryrefslogtreecommitdiffstats
path: root/editor/plugins/script_text_editor.cpp
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-08-22 08:14:46 +0200
committerGitHub <noreply@github.com>2017-08-22 08:14:46 +0200
commitc2346b92b285a50bb85fe935763d25e043fa3e5c (patch)
tree83a1c9bddda52e67d3cf39adfc2fe3a6f85a85ff /editor/plugins/script_text_editor.cpp
parent7f49e2a7a0e74b7de98c4cb176f333f78d6c0e50 (diff)
parentce4eb307789eb86261afecc1400de5e5b0832400 (diff)
downloadredot-engine-c2346b92b285a50bb85fe935763d25e043fa3e5c.tar.gz
Merge pull request #10507 from toger5/override_code_them_bg
added setting to override the theme background with editor theme color
Diffstat (limited to 'editor/plugins/script_text_editor.cpp')
-rw-r--r--editor/plugins/script_text_editor.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 1a3092b6e4..19de027287 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -75,9 +75,14 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->clear_colors();
- /* keyword color */
+ /* color from color_theme or from editor color */
+
+ Color background_color = EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0));
+ if (EDITOR_DEF("text_editor/theme/adapted_code_editor_background_color", false))
+ background_color = get_color("dark_color_1", "Editor");
- text_edit->add_color_override("background_color", EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0)));
+ /* keyword color */
+ text_edit->add_color_override("background_color", background_color);
text_edit->add_color_override("completion_background_color", EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0)));
text_edit->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244")));
text_edit->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")));