diff options
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 91 |
1 files changed, 31 insertions, 60 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index ea114472a8..0ebcef8e5e 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1063,67 +1063,38 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { EditorSettings *setting = EditorSettings::get_singleton(); String text_editor_color_theme = setting->get("text_editor/theme/color_theme"); if (text_editor_color_theme == "Adaptive") { - setting->set_manually("text_editor/highlighting/symbol_color", symbol_color); - setting->set_manually("text_editor/highlighting/keyword_color", keyword_color); - setting->set_manually("text_editor/highlighting/base_type_color", basetype_color); - setting->set_manually("text_editor/highlighting/engine_type_color", type_color); - setting->set_manually("text_editor/highlighting/comment_color", comment_color); - setting->set_manually("text_editor/highlighting/string_color", string_color); - setting->set_manually("text_editor/highlighting/background_color", background_color); - setting->set_manually("text_editor/highlighting/completion_background_color", completion_background_color); - setting->set_manually("text_editor/highlighting/completion_selected_color", completion_selected_color); - setting->set_manually("text_editor/highlighting/completion_existing_color", completion_existing_color); - setting->set_manually("text_editor/highlighting/completion_scroll_color", completion_scroll_color); - setting->set_manually("text_editor/highlighting/completion_font_color", completion_font_color); - setting->set_manually("text_editor/highlighting/text_color", text_color); - setting->set_manually("text_editor/highlighting/line_number_color", line_number_color); - setting->set_manually("text_editor/highlighting/caret_color", caret_color); - setting->set_manually("text_editor/highlighting/caret_background_color", caret_background_color); - setting->set_manually("text_editor/highlighting/text_selected_color", text_selected_color); - setting->set_manually("text_editor/highlighting/selection_color", selection_color); - setting->set_manually("text_editor/highlighting/brace_mismatch_color", brace_mismatch_color); - setting->set_manually("text_editor/highlighting/current_line_color", current_line_color); - setting->set_manually("text_editor/highlighting/line_length_guideline_color", line_length_guideline_color); - setting->set_manually("text_editor/highlighting/word_highlighted_color", word_highlighted_color); - setting->set_manually("text_editor/highlighting/number_color", number_color); - setting->set_manually("text_editor/highlighting/function_color", function_color); - setting->set_manually("text_editor/highlighting/member_variable_color", member_variable_color); - setting->set_manually("text_editor/highlighting/mark_color", mark_color); - setting->set_manually("text_editor/highlighting/breakpoint_color", breakpoint_color); - setting->set_manually("text_editor/highlighting/code_folding_color", code_folding_color); - setting->set_manually("text_editor/highlighting/search_result_color", search_result_color); - setting->set_manually("text_editor/highlighting/search_result_border_color", search_result_border_color); + setting->set_initial_value("text_editor/highlighting/symbol_color", symbol_color); + setting->set_initial_value("text_editor/highlighting/keyword_color", keyword_color); + setting->set_initial_value("text_editor/highlighting/base_type_color", basetype_color); + setting->set_initial_value("text_editor/highlighting/engine_type_color", type_color); + setting->set_initial_value("text_editor/highlighting/comment_color", comment_color); + setting->set_initial_value("text_editor/highlighting/string_color", string_color); + setting->set_initial_value("text_editor/highlighting/background_color", background_color); + setting->set_initial_value("text_editor/highlighting/completion_background_color", completion_background_color); + setting->set_initial_value("text_editor/highlighting/completion_selected_color", completion_selected_color); + setting->set_initial_value("text_editor/highlighting/completion_existing_color", completion_existing_color); + setting->set_initial_value("text_editor/highlighting/completion_scroll_color", completion_scroll_color); + setting->set_initial_value("text_editor/highlighting/completion_font_color", completion_font_color); + setting->set_initial_value("text_editor/highlighting/text_color", text_color); + setting->set_initial_value("text_editor/highlighting/line_number_color", line_number_color); + setting->set_initial_value("text_editor/highlighting/caret_color", caret_color); + setting->set_initial_value("text_editor/highlighting/caret_background_color", caret_background_color); + setting->set_initial_value("text_editor/highlighting/text_selected_color", text_selected_color); + setting->set_initial_value("text_editor/highlighting/selection_color", selection_color); + setting->set_initial_value("text_editor/highlighting/brace_mismatch_color", brace_mismatch_color); + setting->set_initial_value("text_editor/highlighting/current_line_color", current_line_color); + setting->set_initial_value("text_editor/highlighting/line_length_guideline_color", line_length_guideline_color); + setting->set_initial_value("text_editor/highlighting/word_highlighted_color", word_highlighted_color); + setting->set_initial_value("text_editor/highlighting/number_color", number_color); + setting->set_initial_value("text_editor/highlighting/function_color", function_color); + setting->set_initial_value("text_editor/highlighting/member_variable_color", member_variable_color); + setting->set_initial_value("text_editor/highlighting/mark_color", mark_color); + setting->set_initial_value("text_editor/highlighting/breakpoint_color", breakpoint_color); + setting->set_initial_value("text_editor/highlighting/code_folding_color", code_folding_color); + setting->set_initial_value("text_editor/highlighting/search_result_color", search_result_color); + setting->set_initial_value("text_editor/highlighting/search_result_border_color", search_result_border_color); } else if (text_editor_color_theme == "Default") { - setting->set_manually("text_editor/highlighting/symbol_color", Color::html("badfff")); - setting->set_manually("text_editor/highlighting/keyword_color", Color::html("ffffb3")); - setting->set_manually("text_editor/highlighting/base_type_color", Color::html("a4ffd4")); - setting->set_manually("text_editor/highlighting/engine_type_color", Color::html("83d3ff")); - setting->set_manually("text_editor/highlighting/comment_color", Color::html("676767")); - setting->set_manually("text_editor/highlighting/string_color", Color::html("ef6ebe")); - setting->set_manually("text_editor/highlighting/background_color", Color::html("3b000000")); - setting->set_manually("text_editor/highlighting/completion_background_color", Color::html("2C2A32")); - setting->set_manually("text_editor/highlighting/completion_selected_color", Color::html("434244")); - setting->set_manually("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf")); - setting->set_manually("text_editor/highlighting/completion_scroll_color", Color::html("ffffff")); - setting->set_manually("text_editor/highlighting/completion_font_color", Color::html("aaaaaa")); - setting->set_manually("text_editor/highlighting/text_color", Color::html("aaaaaa")); - setting->set_manually("text_editor/highlighting/line_number_color", Color::html("66aaaaaa")); - setting->set_manually("text_editor/highlighting/caret_color", Color::html("aaaaaa")); - setting->set_manually("text_editor/highlighting/caret_background_color", Color::html("000000")); - setting->set_manually("text_editor/highlighting/text_selected_color", Color::html("000000")); - setting->set_manually("text_editor/highlighting/selection_color", Color::html("6ca9c2")); - setting->set_manually("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2)); - setting->set_manually("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15)); - setting->set_manually("text_editor/highlighting/line_length_guideline_color", Color(0.3, 0.5, 0.8, 0.1)); - setting->set_manually("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15)); - setting->set_manually("text_editor/highlighting/number_color", Color::html("EB9532")); - setting->set_manually("text_editor/highlighting/function_color", Color::html("66a2ce")); - setting->set_manually("text_editor/highlighting/member_variable_color", Color::html("e64e59")); - setting->set_manually("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4)); - setting->set_manually("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2)); - setting->set_manually("text_editor/highlighting/code_folding_color", Color(0.8, 0.8, 0.8, 0.8)); - setting->set_manually("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1)); - setting->set_manually("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1)); + setting->load_text_editor_theme(); } return theme; |