summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2016-11-09 15:47:15 +0100
committerGitHub <noreply@github.com>2016-11-09 15:47:15 +0100
commit7d1230a266f4eab3262ebfcbf4a89148dfcb3c48 (patch)
tree8c2d5368405c7bf1c591dde28dbca3faa3bec3d4 /tools/editor
parent2ba1b5837496c66ee1b08a290d251112f435e3e5 (diff)
parent0e2c15e91a4b9b7d4e24a1e4d2e9b791b5bd9a93 (diff)
Merge pull request #7052 from Paulb23/text_edit_color_uniformation
Made background and symbol color follow the color API
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/plugins/script_text_editor.cpp8
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp8
2 files changed, 4 insertions, 12 deletions
diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp
index 40fc3a7bda..23252c4077 100644
--- a/tools/editor/plugins/script_text_editor.cpp
+++ b/tools/editor/plugins/script_text_editor.cpp
@@ -100,7 +100,7 @@ void ScriptTextEditor::_load_theme_settings() {
/* keyword color */
- text_edit->set_custom_bg_color(EDITOR_DEF("text_editor/background_color",Color(0,0,0,0)));
+ text_edit->add_color_override("background_color", EDITOR_DEF("text_editor/background_color",Color(0,0,0,0)));
text_edit->add_color_override("completion_background_color", EDITOR_DEF("text_editor/completion_background_color", Color(0,0,0,0)));
text_edit->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/completion_selected_color", Color::html("434244")));
text_edit->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/completion_existing_color", Color::html("21dfdfdf")));
@@ -122,6 +122,7 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->add_color_override("breakpoint_color", EDITOR_DEF("text_editor/breakpoint_color", Color(0.8,0.8,0.4,0.2)));
text_edit->add_color_override("search_result_color",EDITOR_DEF("text_editor/search_result_color",Color(0.05,0.25,0.05,1)));
text_edit->add_color_override("search_result_border_color",EDITOR_DEF("text_editor/search_result_border_color",Color(0.1,0.45,0.1,1)));
+ text_edit->add_color_override("symbol_color",EDITOR_DEF("text_editor/symbol_color",Color::hex(0x005291ff)));
text_edit->add_constant_override("line_spacing", EDITOR_DEF("text_editor/line_spacing",4));
Color keyword_color= EDITOR_DEF("text_editor/keyword_color",Color(0.5,0.0,0.2));
@@ -190,11 +191,6 @@ void ScriptTextEditor::_load_theme_settings() {
String end = string.get_slice_count(" ")>1?string.get_slice(" ",1):String();
text_edit->add_color_region(beg,end,string_color,end=="");
}
-
- //colorize symbols
- Color symbol_color= EDITOR_DEF("text_editor/symbol_color",Color::hex(0x005291ff));
- text_edit->set_symbol_color(symbol_color);
-
}
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index 861f5678f6..f67151d8e9 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -77,7 +77,7 @@ void ShaderTextEditor::_load_theme_settings() {
/* keyword color */
- get_text_edit()->set_custom_bg_color(EDITOR_DEF("text_editor/background_color",Color(0,0,0,0)));
+ get_text_edit()->add_color_override("background_color", EDITOR_DEF("text_editor/background_color",Color(0,0,0,0)));
get_text_edit()->add_color_override("completion_background_color", EDITOR_DEF("text_editor/completion_background_color", Color(0,0,0,0)));
get_text_edit()->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/completion_selected_color", Color::html("434244")));
get_text_edit()->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/completion_existing_color", Color::html("21dfdfdf")));
@@ -99,6 +99,7 @@ void ShaderTextEditor::_load_theme_settings() {
get_text_edit()->add_color_override("breakpoint_color", EDITOR_DEF("text_editor/breakpoint_color", Color(0.8,0.8,0.4,0.2)));
get_text_edit()->add_color_override("search_result_color",EDITOR_DEF("text_editor/search_result_color",Color(0.05,0.25,0.05,1)));
get_text_edit()->add_color_override("search_result_border_color",EDITOR_DEF("text_editor/search_result_border_color",Color(0.1,0.45,0.1,1)));
+ get_text_edit()->add_color_override("symbol_color",EDITOR_DEF("text_editor/symbol_color",Color::hex(0x005291ff)));
Color keyword_color= EDITOR_DEF("text_editor/keyword_color",Color(0.5,0.0,0.2));
@@ -135,11 +136,6 @@ void ShaderTextEditor::_load_theme_settings() {
String end = string.get_slice_count(" ")>1?string.get_slice(" ",1):String();
get_text_edit()->add_color_region(beg,end,string_color,end=="");
}*/
-
- //colorize symbols
- Color symbol_color= EDITOR_DEF("text_editor/symbol_color",Color::hex(0x005291ff));
- get_text_edit()->set_symbol_color(symbol_color);
-
}