diff options
Diffstat (limited to 'editor/editor_themes.cpp')
-rw-r--r-- | editor/editor_themes.cpp | 99 |
1 files changed, 67 insertions, 32 deletions
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 5610baa775..3644893663 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -5,8 +5,8 @@ /* GODOT ENGINE */ /* https://godotengine.org */ /*************************************************************************/ -/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */ -/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */ +/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */ +/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */ /* */ /* Permission is hereby granted, free of charge, to any person obtaining */ /* a copy of this software and associated documentation files (the */ @@ -1056,36 +1056,71 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { const Color search_result_color = alpha1; const Color search_result_border_color = alpha4; - theme->set_color("text_editor/theme/symbol_color", "Editor", symbol_color); - theme->set_color("text_editor/theme/keyword_color", "Editor", keyword_color); - theme->set_color("text_editor/theme/basetype_color", "Editor", basetype_color); - theme->set_color("text_editor/theme/type_color", "Editor", type_color); - theme->set_color("text_editor/theme/comment_color", "Editor", comment_color); - theme->set_color("text_editor/theme/string_color", "Editor", string_color); - theme->set_color("text_editor/theme/background_color", "Editor", te_background_color); - theme->set_color("text_editor/theme/completion_background_color", "Editor", completion_background_color); - theme->set_color("text_editor/theme/completion_selected_color", "Editor", completion_selected_color); - theme->set_color("text_editor/theme/completion_existing_color", "Editor", completion_existing_color); - theme->set_color("text_editor/theme/completion_scroll_color", "Editor", completion_scroll_color); - theme->set_color("text_editor/theme/completion_font_color", "Editor", completion_font_color); - theme->set_color("text_editor/theme/text_color", "Editor", text_color); - theme->set_color("text_editor/theme/line_number_color", "Editor", line_number_color); - theme->set_color("text_editor/theme/caret_color", "Editor", caret_color); - theme->set_color("text_editor/theme/caret_background_color", "Editor", caret_background_color); - theme->set_color("text_editor/theme/text_selected_color", "Editor", text_selected_color); - theme->set_color("text_editor/theme/selection_color", "Editor", selection_color); - theme->set_color("text_editor/theme/brace_mismatch_color", "Editor", brace_mismatch_color); - theme->set_color("text_editor/theme/current_line_color", "Editor", current_line_color); - theme->set_color("text_editor/theme/line_length_guideline_color", "Editor", line_length_guideline_color); - theme->set_color("text_editor/theme/word_highlighted_color", "Editor", word_highlighted_color); - theme->set_color("text_editor/theme/number_color", "Editor", number_color); - theme->set_color("text_editor/theme/function_color", "Editor", function_color); - theme->set_color("text_editor/theme/member_variable_color", "Editor", member_variable_color); - theme->set_color("text_editor/theme/mark_color", "Editor", mark_color); - theme->set_color("text_editor/theme/breakpoint_color", "Editor", breakpoint_color); - theme->set_color("text_editor/theme/code_folding_color", "Editor", code_folding_color); - theme->set_color("text_editor/theme/search_result_color", "Editor", search_result_color); - theme->set_color("text_editor/theme/search_result_border_color", "Editor", search_result_border_color); + 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); + } 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)); + } return theme; } |