diff options
Diffstat (limited to 'editor')
-rw-r--r-- | editor/editor_settings.cpp | 21 | ||||
-rw-r--r-- | editor/editor_settings.h | 2 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 4 |
3 files changed, 13 insertions, 14 deletions
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 28b01c0d18..1255526a4a 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -502,12 +502,12 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { /* Text editor */ // Theme - _initial_set("text_editor/theme/color_theme", "Adaptive"); - hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Adaptive,Default,Custom"); + _initial_set("text_editor/theme/color_theme", "Default"); + hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Default,Godot 2,Custom"); _initial_set("text_editor/theme/line_spacing", 6); hints["text_editor/theme/line_spacing"] = PropertyInfo(Variant::INT, "text_editor/theme/line_spacing", PROPERTY_HINT_RANGE, "0,50,1"); - _load_default_text_editor_theme(); + _load_godot2_text_editor_theme(); // Highlighting _initial_set("text_editor/highlighting/highlight_all_occurrences", true); @@ -785,9 +785,8 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { }; } -void EditorSettings::_load_default_text_editor_theme() { - bool dark_theme = is_dark_theme(); - +void EditorSettings::_load_godot2_text_editor_theme() { + // Godot 2 is only a dark theme; it doesn't have a light theme counterpart. _initial_set("text_editor/highlighting/symbol_color", Color(0.73, 0.87, 1.0)); _initial_set("text_editor/highlighting/keyword_color", Color(1.0, 1.0, 0.7)); _initial_set("text_editor/highlighting/control_flow_keyword_color", Color(1.0, 0.85, 0.7)); @@ -796,7 +795,7 @@ void EditorSettings::_load_default_text_editor_theme() { _initial_set("text_editor/highlighting/user_type_color", Color(0.42, 0.67, 0.93)); _initial_set("text_editor/highlighting/comment_color", Color(0.4, 0.4, 0.4)); _initial_set("text_editor/highlighting/string_color", Color(0.94, 0.43, 0.75)); - _initial_set("text_editor/highlighting/background_color", dark_theme ? Color(0.0, 0.0, 0.0, 0.23) : Color(0.2, 0.23, 0.31)); + _initial_set("text_editor/highlighting/background_color", Color(0.13, 0.12, 0.15)); _initial_set("text_editor/highlighting/completion_background_color", Color(0.17, 0.16, 0.2)); _initial_set("text_editor/highlighting/completion_selected_color", Color(0.26, 0.26, 0.27)); _initial_set("text_editor/highlighting/completion_existing_color", Color(0.13, 0.87, 0.87, 0.87)); @@ -846,7 +845,7 @@ bool EditorSettings::_save_text_editor_theme(String p_file) { } bool EditorSettings::_is_default_text_editor_theme(String p_theme_name) { - return p_theme_name == "default" || p_theme_name == "adaptive" || p_theme_name == "custom"; + return p_theme_name == "default" || p_theme_name == "godot 2" || p_theme_name == "custom"; } static Dictionary _get_builtin_script_templates() { @@ -1367,7 +1366,7 @@ bool EditorSettings::is_dark_theme() { } void EditorSettings::list_text_editor_themes() { - String themes = "Adaptive,Default,Custom"; + String themes = "Default,Godot 2,Custom"; DirAccess *d = DirAccess::open(get_text_editor_themes_dir()); if (d) { @@ -1395,8 +1394,8 @@ void EditorSettings::load_text_editor_theme() { String p_file = get("text_editor/theme/color_theme"); if (_is_default_text_editor_theme(p_file.get_file().to_lower())) { - if (p_file == "Default") { - _load_default_text_editor_theme(); + if (p_file == "Godot 2") { + _load_godot2_text_editor_theme(); } return; // sorry for "Settings changed" console spam } diff --git a/editor/editor_settings.h b/editor/editor_settings.h index 5c9eec34a2..4c361403a9 100644 --- a/editor/editor_settings.h +++ b/editor/editor_settings.h @@ -104,7 +104,7 @@ private: void _add_property_info_bind(const Dictionary &p_info); void _load_defaults(Ref<ConfigFile> p_extra_config = Ref<ConfigFile>()); - void _load_default_text_editor_theme(); + void _load_godot2_text_editor_theme(); bool _save_text_editor_theme(String p_file); bool _is_default_text_editor_theme(String p_theme_name); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index 3c703f3680..7971dfc313 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -1387,7 +1387,7 @@ 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") { + if (text_editor_color_theme == "Default") { setting->set_initial_value("text_editor/highlighting/symbol_color", symbol_color, true); setting->set_initial_value("text_editor/highlighting/keyword_color", keyword_color, true); setting->set_initial_value("text_editor/highlighting/control_flow_keyword_color", control_flow_keyword_color, true); @@ -1423,7 +1423,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { setting->set_initial_value("text_editor/highlighting/code_folding_color", code_folding_color, true); setting->set_initial_value("text_editor/highlighting/search_result_color", search_result_color, true); setting->set_initial_value("text_editor/highlighting/search_result_border_color", search_result_border_color, true); - } else if (text_editor_color_theme == "Default") { + } else if (text_editor_color_theme == "Godot 2") { setting->load_text_editor_theme(); } |