summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
authorPaulb23 <p_batty@hotmail.co.uk>2021-08-15 18:14:46 +0100
committerPaulb23 <p_batty@hotmail.co.uk>2021-08-16 17:18:49 +0100
commitbcfc591f86faf00fbed361a4feb2ee6024ea7e29 (patch)
tree6102216037624960cccbbbd4d02fe69cb0b80cea /editor
parentd7ab7ff6be29554fc5287e2b7205dbd96213ae08 (diff)
Reorganise text editor settings
Diffstat (limited to 'editor')
-rw-r--r--editor/code_editor.cpp79
-rw-r--r--editor/editor_settings.cpp193
-rw-r--r--editor/editor_themes.cpp114
-rw-r--r--editor/plugins/editor_preview_plugins.cpp12
-rw-r--r--editor/plugins/script_editor_plugin.cpp60
-rw-r--r--editor/plugins/script_text_editor.cpp10
-rw-r--r--editor/plugins/shader_editor_plugin.cpp24
-rw-r--r--editor/plugins/text_editor.cpp2
-rw-r--r--editor/plugins/visual_shader_editor_plugin.cpp36
-rw-r--r--editor/settings_config_dialog.cpp2
10 files changed, 277 insertions, 255 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index a5943c952b..48f2be450b 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -926,38 +926,55 @@ bool CodeTextEditor::_add_font_size(int p_delta) {
}
void CodeTextEditor::update_editor_settings() {
- completion_font_color = EDITOR_GET("text_editor/highlighting/completion_font_color");
- completion_string_color = EDITOR_GET("text_editor/highlighting/string_color");
- completion_comment_color = EDITOR_GET("text_editor/highlighting/comment_color");
-
- text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_all_occurrences"));
- text_editor->set_highlight_current_line(EditorSettings::get_singleton()->get("text_editor/highlighting/highlight_current_line"));
- text_editor->set_indent_using_spaces(EditorSettings::get_singleton()->get("text_editor/indent/type"));
- text_editor->set_indent_size(EditorSettings::get_singleton()->get("text_editor/indent/size"));
- text_editor->set_auto_indent_enabled(EditorSettings::get_singleton()->get("text_editor/indent/auto_indent"));
- text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/indent/draw_tabs"));
- text_editor->set_draw_spaces(EditorSettings::get_singleton()->get("text_editor/indent/draw_spaces"));
- text_editor->set_smooth_scroll_enabled(EditorSettings::get_singleton()->get("text_editor/navigation/smooth_scrolling"));
- text_editor->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/navigation/v_scroll_speed"));
- text_editor->set_draw_minimap(EditorSettings::get_singleton()->get("text_editor/navigation/show_minimap"));
- text_editor->set_minimap_width((int)EditorSettings::get_singleton()->get("text_editor/navigation/minimap_width") * EDSCALE);
- text_editor->set_draw_line_numbers(EditorSettings::get_singleton()->get("text_editor/appearance/show_line_numbers"));
- text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/appearance/line_numbers_zero_padded"));
- text_editor->set_draw_bookmarks_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/show_bookmark_gutter"));
- text_editor->set_line_folding_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/code_folding"));
- text_editor->set_draw_fold_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/code_folding"));
- text_editor->set_line_wrapping_mode((TextEdit::LineWrappingMode)EditorSettings::get_singleton()->get("text_editor/appearance/word_wrap").operator int());
- text_editor->set_scroll_past_end_of_file_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/scroll_past_end_of_file"));
- text_editor->set_caret_type((TextEdit::CaretType)EditorSettings::get_singleton()->get("text_editor/cursor/type").operator int());
- text_editor->set_caret_blink_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink"));
- text_editor->set_caret_blink_speed(EditorSettings::get_singleton()->get("text_editor/cursor/caret_blink_speed"));
+ // Theme: Highlighting
+ completion_font_color = EDITOR_GET("text_editor/theme/highlighting/completion_font_color");
+ completion_string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");
+ completion_comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
+
+ // Appearance: Caret
+ text_editor->set_caret_type((TextEdit::CaretType)EditorSettings::get_singleton()->get("text_editor/appearance/caret/type").operator int());
+ text_editor->set_caret_blink_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/caret/caret_blink"));
+ text_editor->set_caret_blink_speed(EditorSettings::get_singleton()->get("text_editor/appearance/caret/caret_blink_speed"));
+ text_editor->set_highlight_current_line(EditorSettings::get_singleton()->get("text_editor/appearance/caret/highlight_current_line"));
+ text_editor->set_highlight_all_occurrences(EditorSettings::get_singleton()->get("text_editor/appearance/caret/highlight_all_occurrences"));
+
+ // Appearance: Gutters
+ text_editor->set_draw_line_numbers(EditorSettings::get_singleton()->get("text_editor/appearance/gutters/show_line_numbers"));
+ text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/appearance/gutters/line_numbers_zero_padded"));
+ text_editor->set_draw_bookmarks_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/gutters/show_bookmark_gutter"));
+
+ // Appearance: Minimap
+ text_editor->set_draw_minimap(EditorSettings::get_singleton()->get("text_editor/appearance/minimap/show_minimap"));
+ text_editor->set_minimap_width((int)EditorSettings::get_singleton()->get("text_editor/appearance/minimap/minimap_width") * EDSCALE);
+
+ // Appearance: Lines
+ text_editor->set_line_folding_enabled(EditorSettings::get_singleton()->get("text_editor/appearance/lines/code_folding"));
+ text_editor->set_draw_fold_gutter(EditorSettings::get_singleton()->get("text_editor/appearance/lines/code_folding"));
+ text_editor->set_line_wrapping_mode((TextEdit::LineWrappingMode)EditorSettings::get_singleton()->get("text_editor/appearance/lines/word_wrap").operator int());
+
+ // Appearance: Whitespace
+ text_editor->set_draw_tabs(EditorSettings::get_singleton()->get("text_editor/appearance/whitespace/draw_tabs"));
+ text_editor->set_draw_spaces(EditorSettings::get_singleton()->get("text_editor/appearance/whitespace/draw_spaces"));
+
+ // Behavior: Navigation
+ text_editor->set_scroll_past_end_of_file_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/scroll_past_end_of_file"));
+ text_editor->set_smooth_scroll_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/smooth_scrolling"));
+ text_editor->set_v_scroll_speed(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/v_scroll_speed"));
+
+ // Behavior: indent
+ text_editor->set_indent_using_spaces(EditorSettings::get_singleton()->get("text_editor/behavior/indent/type"));
+ text_editor->set_indent_size(EditorSettings::get_singleton()->get("text_editor/behavior/indent/size"));
+ text_editor->set_auto_indent_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/indent/auto_indent"));
+
+ // Completion
text_editor->set_auto_brace_completion_enabled(EditorSettings::get_singleton()->get("text_editor/completion/auto_brace_complete"));
- if (EditorSettings::get_singleton()->get("text_editor/appearance/show_line_length_guidelines")) {
+ // Appearance: Guidelines
+ if (EditorSettings::get_singleton()->get("text_editor/appearance/guidelines/show_line_length_guidelines")) {
TypedArray<int> guideline_cols;
- guideline_cols.append(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_hard_column"));
- if (EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column") != guideline_cols[0]) {
- guideline_cols.append(EditorSettings::get_singleton()->get("text_editor/appearance/line_length_guideline_soft_column"));
+ guideline_cols.append(EditorSettings::get_singleton()->get("text_editor/appearance/guidelines/line_length_guideline_hard_column"));
+ if (EditorSettings::get_singleton()->get("text_editor/appearance/guidelines/line_length_guideline_soft_column") != guideline_cols[0]) {
+ guideline_cols.append(EditorSettings::get_singleton()->get("text_editor/appearance/guidelines/line_length_guideline_soft_column"));
}
text_editor->set_line_length_guidelines(guideline_cols);
}
@@ -1028,7 +1045,7 @@ void CodeTextEditor::insert_final_newline() {
}
void CodeTextEditor::convert_indent_to_spaces() {
- int indent_size = EditorSettings::get_singleton()->get("text_editor/indent/size");
+ int indent_size = EditorSettings::get_singleton()->get("text_editor/behavior/indent/size");
String indent = "";
for (int i = 0; i < indent_size; i++) {
@@ -1072,7 +1089,7 @@ void CodeTextEditor::convert_indent_to_spaces() {
}
void CodeTextEditor::convert_indent_to_tabs() {
- int indent_size = EditorSettings::get_singleton()->get("text_editor/indent/size");
+ int indent_size = EditorSettings::get_singleton()->get("text_editor/behavior/indent/size");
indent_size -= 1;
int cursor_line = text_editor->get_caret_line();
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 009a83994c..3fc010c701 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -492,68 +492,73 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Theme
_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");
+ // Theme: Highlighting
_load_godot2_text_editor_theme();
- // Highlighting
- _initial_set("text_editor/highlighting/highlight_all_occurrences", true);
- _initial_set("text_editor/highlighting/highlight_current_line", true);
- _initial_set("text_editor/highlighting/highlight_type_safe_lines", true);
-
- // Indent
- _initial_set("text_editor/indent/type", 0);
- hints["text_editor/indent/type"] = PropertyInfo(Variant::INT, "text_editor/indent/type", PROPERTY_HINT_ENUM, "Tabs,Spaces");
- _initial_set("text_editor/indent/size", 4);
- hints["text_editor/indent/size"] = PropertyInfo(Variant::INT, "text_editor/indent/size", PROPERTY_HINT_RANGE, "1, 64, 1"); // size of 0 crashes.
- _initial_set("text_editor/indent/auto_indent", true);
- _initial_set("text_editor/indent/convert_indent_on_save", true);
- _initial_set("text_editor/indent/draw_tabs", true);
- _initial_set("text_editor/indent/draw_spaces", false);
-
- // Navigation
- _initial_set("text_editor/navigation/smooth_scrolling", true);
- _initial_set("text_editor/navigation/v_scroll_speed", 80);
- _initial_set("text_editor/navigation/show_minimap", true);
- _initial_set("text_editor/navigation/minimap_width", 80);
- hints["text_editor/navigation/minimap_width"] = PropertyInfo(Variant::INT, "text_editor/navigation/minimap_width", PROPERTY_HINT_RANGE, "50,250,1");
-
// Appearance
- _initial_set("text_editor/appearance/show_line_numbers", true);
- _initial_set("text_editor/appearance/line_numbers_zero_padded", false);
- _initial_set("text_editor/appearance/show_bookmark_gutter", true);
- _initial_set("text_editor/appearance/show_info_gutter", true);
- _initial_set("text_editor/appearance/code_folding", true);
- _initial_set("text_editor/appearance/word_wrap", 0);
- hints["text_editor/appearance/word_wrap"] = PropertyInfo(Variant::INT, "text_editor/appearance/word_wrap", PROPERTY_HINT_ENUM, "None,Boundary");
-
- _initial_set("text_editor/appearance/show_line_length_guidelines", true);
- _initial_set("text_editor/appearance/line_length_guideline_soft_column", 80);
- hints["text_editor/appearance/line_length_guideline_soft_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/line_length_guideline_soft_column", PROPERTY_HINT_RANGE, "20, 160, 1");
- _initial_set("text_editor/appearance/line_length_guideline_hard_column", 100);
- hints["text_editor/appearance/line_length_guideline_hard_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/line_length_guideline_hard_column", PROPERTY_HINT_RANGE, "20, 160, 1");
+ // Appearance: Caret
+ _initial_set("text_editor/appearance/caret/type", 0);
+ hints["text_editor/appearance/caret/type"] = PropertyInfo(Variant::INT, "text_editor/appearance/caret/type", PROPERTY_HINT_ENUM, "Line,Block");
+ _initial_set("text_editor/appearance/caret/caret_blink", true);
+ _initial_set("text_editor/appearance/caret/caret_blink_speed", 0.5);
+ hints["text_editor/appearance/caret/caret_blink_speed"] = PropertyInfo(Variant::FLOAT, "text_editor/appearance/caret/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
+ _initial_set("text_editor/appearance/caret/highlight_current_line", true);
+ _initial_set("text_editor/appearance/caret/highlight_all_occurrences", true);
+
+ // Appearance: Guidelines
+ _initial_set("text_editor/appearance/guidelines/show_line_length_guidelines", true);
+ _initial_set("text_editor/appearance/guidelines/line_length_guideline_soft_column", 80);
+ hints["text_editor/appearance/guidelines/line_length_guideline_soft_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/guidelines/line_length_guideline_soft_column", PROPERTY_HINT_RANGE, "20, 160, 1");
+ _initial_set("text_editor/appearance/guidelines/line_length_guideline_hard_column", 100);
+ hints["text_editor/appearance/guidelines/line_length_guideline_hard_column"] = PropertyInfo(Variant::INT, "text_editor/appearance/guidelines/line_length_guideline_hard_column", PROPERTY_HINT_RANGE, "20, 160, 1");
+
+ // Appearance: Gutters
+ _initial_set("text_editor/appearance/gutters/show_line_numbers", true);
+ _initial_set("text_editor/appearance/gutters/line_numbers_zero_padded", false);
+ _initial_set("text_editor/appearance/gutters/highlight_type_safe_lines", true);
+ _initial_set("text_editor/appearance/gutters/show_bookmark_gutter", true);
+ _initial_set("text_editor/appearance/gutters/show_info_gutter", true);
+
+ // Appearance: Minimap
+ _initial_set("text_editor/appearance/minimap/show_minimap", true);
+ _initial_set("text_editor/appearance/minimap/minimap_width", 80);
+ hints["text_editor/appearance/minimap/minimap_width"] = PropertyInfo(Variant::INT, "text_editor/appearance/minimap/minimap_width", PROPERTY_HINT_RANGE, "50,250,1");
+
+ // Appearance: Lines
+ _initial_set("text_editor/appearance/lines/code_folding", true);
+ _initial_set("text_editor/appearance/lines/word_wrap", 0);
+ hints["text_editor/appearance/lines/word_wrap"] = PropertyInfo(Variant::INT, "text_editor/appearance/lines/word_wrap", PROPERTY_HINT_ENUM, "None,Boundary");
+
+ // Appearance: Whitespace
+ _initial_set("text_editor/appearance/whitespace/draw_tabs", true);
+ _initial_set("text_editor/appearance/whitespace/draw_spaces", false);
+ _initial_set("text_editor/appearance/whitespace/line_spacing", 6);
+ hints["text_editor/appearance/whitespace/line_spacing"] = PropertyInfo(Variant::INT, "text_editor/appearance/whitespace/line_spacing", PROPERTY_HINT_RANGE, "0,50,1");
+
+ // Behavior
+ // Behavior: Navigation
+ _initial_set("text_editor/behavior/navigation/move_caret_on_right_click", true);
+ _initial_set("text_editor/behavior/navigation/scroll_past_end_of_file", false);
+ _initial_set("text_editor/behavior/navigation/smooth_scrolling", true);
+ _initial_set("text_editor/behavior/navigation/v_scroll_speed", 80);
+
+ // Behavior: Indent
+ _initial_set("text_editor/behavior/indent/type", 0);
+ hints["text_editor/behavior/indent/type"] = PropertyInfo(Variant::INT, "text_editor/behavior/indent/type", PROPERTY_HINT_ENUM, "Tabs,Spaces");
+ _initial_set("text_editor/behavior/indent/size", 4);
+ hints["text_editor/behavior/indent/size"] = PropertyInfo(Variant::INT, "text_editor/behavior/indent/size", PROPERTY_HINT_RANGE, "1, 64, 1"); // size of 0 crashes.
+ _initial_set("text_editor/behavior/indent/auto_indent", true);
+
+ // Behavior: Files
+ _initial_set("text_editor/behavior/files/trim_trailing_whitespace_on_save", false);
+ _initial_set("text_editor/behavior/files/autosave_interval_secs", 0);
+ _initial_set("text_editor/behavior/files/restore_scripts_on_load", true);
+ _initial_set("text_editor/behavior/files/convert_indent_on_save", true);
// Script list
_initial_set("text_editor/script_list/show_members_overview", true);
-
- // Files
- _initial_set("text_editor/files/trim_trailing_whitespace_on_save", false);
- _initial_set("text_editor/files/autosave_interval_secs", 0);
- _initial_set("text_editor/files/restore_scripts_on_load", true);
-
- // Tools
- _initial_set("text_editor/tools/create_signal_callbacks", true);
- _initial_set("text_editor/tools/sort_members_outline_alphabetically", false);
-
- // Cursor
- _initial_set("text_editor/cursor/scroll_past_end_of_file", false);
- _initial_set("text_editor/cursor/type", 0);
- hints["text_editor/cursor/type"] = PropertyInfo(Variant::INT, "text_editor/cursor/type", PROPERTY_HINT_ENUM, "Line,Block");
- _initial_set("text_editor/cursor/caret_blink", true);
- _initial_set("text_editor/cursor/caret_blink_speed", 0.5);
- hints["text_editor/cursor/caret_blink_speed"] = PropertyInfo(Variant::FLOAT, "text_editor/cursor/caret_blink_speed", PROPERTY_HINT_RANGE, "0.1, 10, 0.01");
- _initial_set("text_editor/cursor/right_click_moves_caret", true);
+ _initial_set("text_editor/script_list/sort_members_outline_alphabetically", false);
// Completion
_initial_set("text_editor/completion/idle_parse_delay", 2.0);
@@ -777,41 +782,41 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
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));
- _initial_set("text_editor/highlighting/base_type_color", Color(0.64, 1.0, 0.83));
- _initial_set("text_editor/highlighting/engine_type_color", Color(0.51, 0.83, 1.0));
- _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", 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));
- _initial_set("text_editor/highlighting/completion_scroll_color", Color(1, 1, 1));
- _initial_set("text_editor/highlighting/completion_font_color", Color(0.67, 0.67, 0.67));
- _initial_set("text_editor/highlighting/text_color", Color(0.67, 0.67, 0.67));
- _initial_set("text_editor/highlighting/line_number_color", Color(0.67, 0.67, 0.67, 0.4));
- _initial_set("text_editor/highlighting/safe_line_number_color", Color(0.67, 0.78, 0.67, 0.6));
- _initial_set("text_editor/highlighting/caret_color", Color(0.67, 0.67, 0.67));
- _initial_set("text_editor/highlighting/caret_background_color", Color(0, 0, 0));
- _initial_set("text_editor/highlighting/text_selected_color", Color(0, 0, 0));
- _initial_set("text_editor/highlighting/selection_color", Color(0.41, 0.61, 0.91, 0.35));
- _initial_set("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2));
- _initial_set("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15));
- _initial_set("text_editor/highlighting/line_length_guideline_color", Color(0.3, 0.5, 0.8, 0.1));
- _initial_set("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15));
- _initial_set("text_editor/highlighting/number_color", Color(0.92, 0.58, 0.2));
- _initial_set("text_editor/highlighting/function_color", Color(0.4, 0.64, 0.81));
- _initial_set("text_editor/highlighting/member_variable_color", Color(0.9, 0.31, 0.35));
- _initial_set("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4));
- _initial_set("text_editor/highlighting/bookmark_color", Color(0.08, 0.49, 0.98));
- _initial_set("text_editor/highlighting/breakpoint_color", Color(0.9, 0.29, 0.3));
- _initial_set("text_editor/highlighting/executing_line_color", Color(0.98, 0.89, 0.27));
- _initial_set("text_editor/highlighting/code_folding_color", Color(0.8, 0.8, 0.8, 0.8));
- _initial_set("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1));
- _initial_set("text_editor/highlighting/search_result_border_color", Color(0.41, 0.61, 0.91, 0.38));
+ _initial_set("text_editor/theme/highlighting/symbol_color", Color(0.73, 0.87, 1.0));
+ _initial_set("text_editor/theme/highlighting/keyword_color", Color(1.0, 1.0, 0.7));
+ _initial_set("text_editor/theme/highlighting/control_flow_keyword_color", Color(1.0, 0.85, 0.7));
+ _initial_set("text_editor/theme/highlighting/base_type_color", Color(0.64, 1.0, 0.83));
+ _initial_set("text_editor/theme/highlighting/engine_type_color", Color(0.51, 0.83, 1.0));
+ _initial_set("text_editor/theme/highlighting/user_type_color", Color(0.42, 0.67, 0.93));
+ _initial_set("text_editor/theme/highlighting/comment_color", Color(0.4, 0.4, 0.4));
+ _initial_set("text_editor/theme/highlighting/string_color", Color(0.94, 0.43, 0.75));
+ _initial_set("text_editor/theme/highlighting/background_color", Color(0.13, 0.12, 0.15));
+ _initial_set("text_editor/theme/highlighting/completion_background_color", Color(0.17, 0.16, 0.2));
+ _initial_set("text_editor/theme/highlighting/completion_selected_color", Color(0.26, 0.26, 0.27));
+ _initial_set("text_editor/theme/highlighting/completion_existing_color", Color(0.13, 0.87, 0.87, 0.87));
+ _initial_set("text_editor/theme/highlighting/completion_scroll_color", Color(1, 1, 1));
+ _initial_set("text_editor/theme/highlighting/completion_font_color", Color(0.67, 0.67, 0.67));
+ _initial_set("text_editor/theme/highlighting/text_color", Color(0.67, 0.67, 0.67));
+ _initial_set("text_editor/theme/highlighting/line_number_color", Color(0.67, 0.67, 0.67, 0.4));
+ _initial_set("text_editor/theme/highlighting/safe_line_number_color", Color(0.67, 0.78, 0.67, 0.6));
+ _initial_set("text_editor/theme/highlighting/caret_color", Color(0.67, 0.67, 0.67));
+ _initial_set("text_editor/theme/highlighting/caret_background_color", Color(0, 0, 0));
+ _initial_set("text_editor/theme/highlighting/text_selected_color", Color(0, 0, 0));
+ _initial_set("text_editor/theme/highlighting/selection_color", Color(0.41, 0.61, 0.91, 0.35));
+ _initial_set("text_editor/theme/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2));
+ _initial_set("text_editor/theme/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15));
+ _initial_set("text_editor/theme/highlighting/line_length_guideline_color", Color(0.3, 0.5, 0.8, 0.1));
+ _initial_set("text_editor/theme/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15));
+ _initial_set("text_editor/theme/highlighting/number_color", Color(0.92, 0.58, 0.2));
+ _initial_set("text_editor/theme/highlighting/function_color", Color(0.4, 0.64, 0.81));
+ _initial_set("text_editor/theme/highlighting/member_variable_color", Color(0.9, 0.31, 0.35));
+ _initial_set("text_editor/theme/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4));
+ _initial_set("text_editor/theme/highlighting/bookmark_color", Color(0.08, 0.49, 0.98));
+ _initial_set("text_editor/theme/highlighting/breakpoint_color", Color(0.9, 0.29, 0.3));
+ _initial_set("text_editor/theme/highlighting/executing_line_color", Color(0.98, 0.89, 0.27));
+ _initial_set("text_editor/theme/highlighting/code_folding_color", Color(0.8, 0.8, 0.8, 0.8));
+ _initial_set("text_editor/theme/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1));
+ _initial_set("text_editor/theme/highlighting/search_result_border_color", Color(0.41, 0.61, 0.91, 0.38));
}
bool EditorSettings::_save_text_editor_theme(String p_file) {
@@ -823,8 +828,8 @@ bool EditorSettings::_save_text_editor_theme(String p_file) {
keys.sort();
for (const String &key : keys) {
- if (key.begins_with("text_editor/highlighting/") && key.find("color") >= 0) {
- cf->set_value(theme_section, key.replace("text_editor/highlighting/", ""), ((Color)props[key].variant).to_html());
+ if (key.begins_with("text_editor/theme/highlighting/") && key.find("color") >= 0) {
+ cf->set_value(theme_section, key.replace("text_editor/theme/highlighting/", ""), ((Color)props[key].variant).to_html());
}
}
@@ -1340,10 +1345,10 @@ void EditorSettings::load_text_editor_theme() {
String val = cf->get_value("color_theme", key);
// don't load if it's not already there!
- if (has_setting("text_editor/highlighting/" + key)) {
+ if (has_setting("text_editor/theme/highlighting/" + key)) {
// make sure it is actually a color
if (val.is_valid_html_color() && key.find("color") >= 0) {
- props["text_editor/highlighting/" + key].variant = Color::html(val); // change manually to prevent "Settings changed" console spam
+ props["text_editor/theme/highlighting/" + key].variant = Color::html(val); // change manually to prevent "Settings changed" console spam
}
}
}
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index e93c8a1a05..2c83fb2df6 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -1061,7 +1061,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("folded", "CodeEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons"));
theme->set_icon("can_fold", "CodeEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons"));
theme->set_icon("executing_line", "CodeEdit", theme->get_icon("MainPlay", "EditorIcons"));
- theme->set_constant("line_spacing", "CodeEdit", EDITOR_DEF("text_editor/theme/line_spacing", 6));
+ theme->set_constant("line_spacing", "CodeEdit", EDITOR_DEF("text_editor/appearance/whitespace/line_spacing", 6));
// H/VSplitContainer
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("GuiVsplitBg", "EditorIcons"), 1, 1, 1, 1));
@@ -1433,67 +1433,67 @@ 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 == "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);
- setting->set_initial_value("text_editor/highlighting/base_type_color", basetype_color, true);
- setting->set_initial_value("text_editor/highlighting/engine_type_color", type_color, true);
- setting->set_initial_value("text_editor/highlighting/user_type_color", usertype_color, true);
- setting->set_initial_value("text_editor/highlighting/comment_color", comment_color, true);
- setting->set_initial_value("text_editor/highlighting/string_color", string_color, true);
- setting->set_initial_value("text_editor/highlighting/background_color", te_background_color, true);
- setting->set_initial_value("text_editor/highlighting/completion_background_color", completion_background_color, true);
- setting->set_initial_value("text_editor/highlighting/completion_selected_color", completion_selected_color, true);
- setting->set_initial_value("text_editor/highlighting/completion_existing_color", completion_existing_color, true);
- setting->set_initial_value("text_editor/highlighting/completion_scroll_color", completion_scroll_color, true);
- setting->set_initial_value("text_editor/highlighting/completion_font_color", completion_font_color, true);
- setting->set_initial_value("text_editor/highlighting/text_color", text_color, true);
- setting->set_initial_value("text_editor/highlighting/line_number_color", line_number_color, true);
- setting->set_initial_value("text_editor/highlighting/safe_line_number_color", safe_line_number_color, true);
- setting->set_initial_value("text_editor/highlighting/caret_color", caret_color, true);
- setting->set_initial_value("text_editor/highlighting/caret_background_color", caret_background_color, true);
- setting->set_initial_value("text_editor/highlighting/text_selected_color", text_selected_color, true);
- setting->set_initial_value("text_editor/highlighting/selection_color", selection_color, true);
- setting->set_initial_value("text_editor/highlighting/brace_mismatch_color", brace_mismatch_color, true);
- setting->set_initial_value("text_editor/highlighting/current_line_color", current_line_color, true);
- setting->set_initial_value("text_editor/highlighting/line_length_guideline_color", line_length_guideline_color, true);
- setting->set_initial_value("text_editor/highlighting/word_highlighted_color", word_highlighted_color, true);
- setting->set_initial_value("text_editor/highlighting/number_color", number_color, true);
- setting->set_initial_value("text_editor/highlighting/function_color", function_color, true);
- setting->set_initial_value("text_editor/highlighting/member_variable_color", member_variable_color, true);
- setting->set_initial_value("text_editor/highlighting/mark_color", mark_color, true);
- setting->set_initial_value("text_editor/highlighting/bookmark_color", bookmark_color, true);
- setting->set_initial_value("text_editor/highlighting/breakpoint_color", breakpoint_color, true);
- setting->set_initial_value("text_editor/highlighting/executing_line_color", executing_line_color, true);
- 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);
+ setting->set_initial_value("text_editor/theme/highlighting/symbol_color", symbol_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/keyword_color", keyword_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/control_flow_keyword_color", control_flow_keyword_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/base_type_color", basetype_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/engine_type_color", type_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/user_type_color", usertype_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/comment_color", comment_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/string_color", string_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/background_color", te_background_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/completion_background_color", completion_background_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/completion_selected_color", completion_selected_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/completion_existing_color", completion_existing_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/completion_scroll_color", completion_scroll_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/completion_font_color", completion_font_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/text_color", text_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/line_number_color", line_number_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/safe_line_number_color", safe_line_number_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/caret_color", caret_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/caret_background_color", caret_background_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/text_selected_color", text_selected_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/selection_color", selection_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/brace_mismatch_color", brace_mismatch_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/current_line_color", current_line_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/line_length_guideline_color", line_length_guideline_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/word_highlighted_color", word_highlighted_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/number_color", number_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/function_color", function_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/member_variable_color", member_variable_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/mark_color", mark_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/bookmark_color", bookmark_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/breakpoint_color", breakpoint_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/executing_line_color", executing_line_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/code_folding_color", code_folding_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/search_result_color", search_result_color, true);
+ setting->set_initial_value("text_editor/theme/highlighting/search_result_border_color", search_result_border_color, true);
} else if (text_editor_color_theme == "Godot 2") {
setting->load_text_editor_theme();
}
// Now theme is loaded, apply it to CodeEdit.
- theme->set_color("background_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/background_color"));
- theme->set_color("completion_background_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/completion_background_color"));
- theme->set_color("completion_selected_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/completion_selected_color"));
- theme->set_color("completion_existing_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/completion_existing_color"));
- theme->set_color("completion_scroll_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/completion_scroll_color"));
- theme->set_color("completion_font_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/completion_font_color"));
- theme->set_color("font_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/text_color"));
- theme->set_color("line_number_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/line_number_color"));
- theme->set_color("caret_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/caret_color"));
- theme->set_color("font_selected_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/text_selected_color"));
- theme->set_color("selection_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/selection_color"));
- theme->set_color("brace_mismatch_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/brace_mismatch_color"));
- theme->set_color("current_line_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/current_line_color"));
- theme->set_color("line_length_guideline_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/line_length_guideline_color"));
- theme->set_color("word_highlighted_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/word_highlighted_color"));
- theme->set_color("bookmark_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/bookmark_color"));
- theme->set_color("breakpoint_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/breakpoint_color"));
- theme->set_color("executing_line_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/executing_line_color"));
- theme->set_color("code_folding_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/code_folding_color"));
- theme->set_color("search_result_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/search_result_color"));
- theme->set_color("search_result_border_color", "CodeEdit", EDITOR_GET("text_editor/highlighting/search_result_border_color"));
+ theme->set_color("background_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/background_color"));
+ theme->set_color("completion_background_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/completion_background_color"));
+ theme->set_color("completion_selected_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/completion_selected_color"));
+ theme->set_color("completion_existing_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/completion_existing_color"));
+ theme->set_color("completion_scroll_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/completion_scroll_color"));
+ theme->set_color("completion_font_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/completion_font_color"));
+ theme->set_color("font_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/text_color"));
+ theme->set_color("line_number_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/line_number_color"));
+ theme->set_color("caret_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/caret_color"));
+ theme->set_color("font_selected_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/text_selected_color"));
+ theme->set_color("selection_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/selection_color"));
+ theme->set_color("brace_mismatch_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/brace_mismatch_color"));
+ theme->set_color("current_line_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/current_line_color"));
+ theme->set_color("line_length_guideline_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/line_length_guideline_color"));
+ theme->set_color("word_highlighted_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/word_highlighted_color"));
+ theme->set_color("bookmark_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/bookmark_color"));
+ theme->set_color("breakpoint_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/breakpoint_color"));
+ theme->set_color("executing_line_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/executing_line_color"));
+ theme->set_color("code_folding_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/code_folding_color"));
+ theme->set_color("search_result_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/search_result_color"));
+ theme->set_color("search_result_border_color", "CodeEdit", EDITOR_GET("text_editor/theme/highlighting/search_result_border_color"));
return theme;
}
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index d47bd2d410..95f68d5f7f 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -505,12 +505,12 @@ Ref<Texture2D> EditorScriptPreviewPlugin::generate(const RES &p_from, const Size
int thumbnail_size = MAX(p_size.x, p_size.y);
img->create(thumbnail_size, thumbnail_size, false, Image::FORMAT_RGBA8);
- Color bg_color = EditorSettings::get_singleton()->get("text_editor/highlighting/background_color");
- Color keyword_color = EditorSettings::get_singleton()->get("text_editor/highlighting/keyword_color");
- Color control_flow_keyword_color = EditorSettings::get_singleton()->get("text_editor/highlighting/control_flow_keyword_color");
- Color text_color = EditorSettings::get_singleton()->get("text_editor/highlighting/text_color");
- Color symbol_color = EditorSettings::get_singleton()->get("text_editor/highlighting/symbol_color");
- Color comment_color = EditorSettings::get_singleton()->get("text_editor/highlighting/comment_color");
+ Color bg_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/background_color");
+ Color keyword_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/keyword_color");
+ Color control_flow_keyword_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/control_flow_keyword_color");
+ Color text_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/text_color");
+ Color symbol_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/symbol_color");
+ Color comment_color = EditorSettings::get_singleton()->get("text_editor/theme/highlighting/comment_color");
if (bg_color.a == 0) {
bg_color = Color(0, 0, 0, 0);
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index e6762826dd..226a54b966 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -94,13 +94,13 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
highlighter->clear_member_keyword_colors();
highlighter->clear_color_regions();
- highlighter->set_symbol_color(EDITOR_GET("text_editor/highlighting/symbol_color"));
- highlighter->set_function_color(EDITOR_GET("text_editor/highlighting/function_color"));
- highlighter->set_number_color(EDITOR_GET("text_editor/highlighting/number_color"));
- highlighter->set_member_variable_color(EDITOR_GET("text_editor/highlighting/member_variable_color"));
+ highlighter->set_symbol_color(EDITOR_GET("text_editor/theme/highlighting/symbol_color"));
+ highlighter->set_function_color(EDITOR_GET("text_editor/theme/highlighting/function_color"));
+ highlighter->set_number_color(EDITOR_GET("text_editor/theme/highlighting/number_color"));
+ highlighter->set_member_variable_color(EDITOR_GET("text_editor/theme/highlighting/member_variable_color"));
/* Engine types. */
- const Color type_color = EDITOR_GET("text_editor/highlighting/engine_type_color");
+ const Color type_color = EDITOR_GET("text_editor/theme/highlighting/engine_type_color");
List<StringName> types;
ClassDB::get_class_list(&types);
for (const StringName &E : types) {
@@ -112,7 +112,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
}
/* User types. */
- const Color usertype_color = EDITOR_GET("text_editor/highlighting/user_type_color");
+ const Color usertype_color = EDITOR_GET("text_editor/theme/highlighting/user_type_color");
List<StringName> global_classes;
ScriptServer::get_global_class_list(&global_classes);
for (const StringName &E : global_classes) {
@@ -131,7 +131,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
const Ref<Script> script = _get_edited_resource();
if (script.is_valid()) {
/* Core types. */
- const Color basetype_color = EDITOR_GET("text_editor/highlighting/base_type_color");
+ const Color basetype_color = EDITOR_GET("text_editor/theme/highlighting/base_type_color");
List<String> core_types;
script->get_language()->get_core_type_words(&core_types);
for (const String &E : core_types) {
@@ -139,8 +139,8 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
}
/* Reserved words. */
- const Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color");
- const Color control_flow_keyword_color = EDITOR_GET("text_editor/highlighting/control_flow_keyword_color");
+ const Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
+ const Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
List<String> keywords;
script->get_language()->get_reserved_words(&keywords);
for (const String &E : keywords) {
@@ -152,7 +152,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
}
/* Member types. */
- const Color member_variable_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
+ const Color member_variable_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
StringName instance_base = script->get_instance_base_type();
if (instance_base != StringName()) {
List<PropertyInfo> plist;
@@ -176,7 +176,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
}
/* Comments */
- const Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color");
+ const Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
List<String> comments;
script->get_language()->get_comment_delimiters(&comments);
for (const String &comment : comments) {
@@ -186,7 +186,7 @@ void EditorStandardSyntaxHighlighter::_update_cache() {
}
/* Strings */
- const Color string_color = EDITOR_GET("text_editor/highlighting/string_color");
+ const Color string_color = EDITOR_GET("text_editor/theme/highlighting/string_color");
List<String> strings;
script->get_language()->get_string_delimiters(&strings);
for (const String &string : strings) {
@@ -961,7 +961,7 @@ bool ScriptEditor::_test_script_times_on_disk(RES p_for_script) {
bool need_ask = false;
bool need_reload = false;
- bool use_autoreload = bool(EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change", false));
+ bool use_autoreload = bool(EDITOR_DEF("text_editor/behavior/files/auto_reload_scripts_on_external_change", false));
for (int i = 0; i < tab_container->get_child_count(); i++) {
ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(i));
@@ -1712,7 +1712,7 @@ void ScriptEditor::_update_members_overview_visibility() {
}
void ScriptEditor::_toggle_members_overview_alpha_sort(bool p_alphabetic_sort) {
- EditorSettings::get_singleton()->set("text_editor/tools/sort_members_outline_alphabetically", p_alphabetic_sort);
+ EditorSettings::get_singleton()->set("text_editor/script_list/sort_members_outline_alphabetically", p_alphabetic_sort);
_update_members_overview();
}
@@ -1725,7 +1725,7 @@ void ScriptEditor::_update_members_overview() {
}
Vector<String> functions = se->get_functions();
- if (EditorSettings::get_singleton()->get("text_editor/tools/sort_members_outline_alphabetically")) {
+ if (EditorSettings::get_singleton()->get("text_editor/script_list/sort_members_outline_alphabetically")) {
functions.sort();
}
@@ -2104,7 +2104,7 @@ bool ScriptEditor::edit(const RES &p_resource, int p_line, int p_col, bool p_gra
const bool use_external_editor =
EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") ||
(script.is_valid() && script->get_language()->overrides_external_editor());
- const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/files/open_dominant_script_on_scene_change");
+ const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/behavior/files/open_dominant_script_on_scene_change");
const bool should_open = (open_dominant && !use_external_editor) || !EditorNode::get_singleton()->is_changing_scene();
@@ -2469,9 +2469,9 @@ void ScriptEditor::_save_layout() {
}
void ScriptEditor::_editor_settings_changed() {
- trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/files/trim_trailing_whitespace_on_save");
- convert_indent_on_save = EditorSettings::get_singleton()->get("text_editor/indent/convert_indent_on_save");
- use_space_indentation = EditorSettings::get_singleton()->get("text_editor/indent/type");
+ trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/trim_trailing_whitespace_on_save");
+ convert_indent_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/convert_indent_on_save");
+ use_space_indentation = EditorSettings::get_singleton()->get("text_editor/behavior/indent/type");
members_overview_enabled = EditorSettings::get_singleton()->get("text_editor/script_list/show_members_overview");
help_overview_enabled = EditorSettings::get_singleton()->get("text_editor/help/show_help_index");
@@ -2498,7 +2498,7 @@ void ScriptEditor::_editor_settings_changed() {
_update_script_colors();
_update_script_names();
- ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/files/auto_reload_and_parse_scripts_on_save", true));
+ ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save", true));
}
void ScriptEditor::_filesystem_changed() {
@@ -2537,7 +2537,7 @@ void ScriptEditor::_update_autosave_timer() {
return;
}
- float autosave_time = EditorSettings::get_singleton()->get("text_editor/files/autosave_interval_secs");
+ float autosave_time = EditorSettings::get_singleton()->get("text_editor/behavior/files/autosave_interval_secs");
if (autosave_time > 0) {
autosave_timer->set_wait_time(autosave_time);
autosave_timer->start();
@@ -2827,7 +2827,7 @@ void ScriptEditor::_make_script_list_context_menu() {
}
void ScriptEditor::set_window_layout(Ref<ConfigFile> p_layout) {
- if (!bool(EDITOR_DEF("text_editor/files/restore_scripts_on_load", true))) {
+ if (!bool(EDITOR_DEF("text_editor/behavior/files/restore_scripts_on_load", true))) {
return;
}
@@ -3120,7 +3120,7 @@ void ScriptEditor::set_scene_root_script(Ref<Script> p_script) {
const bool use_external_editor =
EditorSettings::get_singleton()->get("text_editor/external/use_external_editor") ||
(p_script.is_valid() && p_script->get_language()->overrides_external_editor());
- const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/files/open_dominant_script_on_scene_change");
+ const bool open_dominant = EditorSettings::get_singleton()->get("text_editor/behavior/files/open_dominant_script_on_scene_change");
if (open_dominant && !use_external_editor && p_script.is_valid()) {
edit(p_script);
@@ -3367,7 +3367,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
members_overview_alphabeta_sort_button->set_flat(true);
members_overview_alphabeta_sort_button->set_tooltip(TTR("Toggle alphabetical sorting of the method list."));
members_overview_alphabeta_sort_button->set_toggle_mode(true);
- members_overview_alphabeta_sort_button->set_pressed(EditorSettings::get_singleton()->get("text_editor/tools/sort_members_outline_alphabetically"));
+ members_overview_alphabeta_sort_button->set_pressed(EditorSettings::get_singleton()->get("text_editor/script_list/sort_members_outline_alphabetically"));
members_overview_alphabeta_sort_button->connect("toggled", callable_mp(this, &ScriptEditor::_toggle_members_overview_alpha_sort));
buttons_hbox->add_child(members_overview_alphabeta_sort_button);
@@ -3604,9 +3604,9 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
history_pos = -1;
edit_pass = 0;
- trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/files/trim_trailing_whitespace_on_save");
- convert_indent_on_save = EditorSettings::get_singleton()->get("text_editor/indent/convert_indent_on_save");
- use_space_indentation = EditorSettings::get_singleton()->get("text_editor/indent/type");
+ trim_trailing_whitespace_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/trim_trailing_whitespace_on_save");
+ convert_indent_on_save = EditorSettings::get_singleton()->get("text_editor/behavior/files/convert_indent_on_save");
+ use_space_indentation = EditorSettings::get_singleton()->get("text_editor/behavior/indent/type");
ScriptServer::edit_request_func = _open_script_request;
@@ -3703,9 +3703,9 @@ ScriptEditorPlugin::ScriptEditorPlugin(EditorNode *p_node) {
script_editor->hide();
- EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change", true);
- ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/files/auto_reload_and_parse_scripts_on_save", true));
- EDITOR_DEF("text_editor/files/open_dominant_script_on_scene_change", true);
+ EDITOR_DEF("text_editor/behavior/files/auto_reload_scripts_on_external_change", true);
+ ScriptServer::set_reload_scripts_on_save(EDITOR_DEF("text_editor/behavior/files/auto_reload_and_parse_scripts_on_save", true));
+ EDITOR_DEF("text_editor/behavior/files/open_dominant_script_on_scene_change", true);
EDITOR_DEF("text_editor/external/use_external_editor", false);
EDITOR_DEF("text_editor/external/exec_path", "");
EDITOR_DEF("text_editor/script_list/script_temperature_enabled", true);
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 1d7592d2c3..4491c13b4c 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -166,8 +166,8 @@ void ScriptTextEditor::enable_editor() {
void ScriptTextEditor::_load_theme_settings() {
CodeEdit *text_edit = code_editor->get_text_editor();
- Color updated_marked_line_color = EDITOR_GET("text_editor/highlighting/mark_color");
- Color updated_safe_line_number_color = EDITOR_GET("text_editor/highlighting/safe_line_number_color");
+ Color updated_marked_line_color = EDITOR_GET("text_editor/theme/highlighting/mark_color");
+ Color updated_safe_line_number_color = EDITOR_GET("text_editor/theme/highlighting/safe_line_number_color");
bool safe_line_number_color_updated = updated_safe_line_number_color != safe_line_number_color;
bool marked_line_color_updated = updated_marked_line_color != marked_line_color;
@@ -294,7 +294,7 @@ bool ScriptTextEditor::show_members_overview() {
}
void ScriptTextEditor::update_settings() {
- code_editor->get_text_editor()->set_gutter_draw(connection_gutter, EditorSettings::get_singleton()->get("text_editor/appearance/show_info_gutter"));
+ code_editor->get_text_editor()->set_gutter_draw(connection_gutter, EditorSettings::get_singleton()->get("text_editor/appearance/gutters/show_info_gutter"));
code_editor->update_editor_settings();
}
@@ -506,7 +506,7 @@ void ScriptTextEditor::_validate_script() {
}
errors_panel->pop(); // Table
- bool highlight_safe = EDITOR_DEF("text_editor/highlighting/highlight_type_safe_lines", true);
+ bool highlight_safe = EDITOR_DEF("text_editor/appearance/gutters/highlight_type_safe_lines", true);
bool last_is_safe = false;
for (int i = 0; i < te->get_line_count(); i++) {
if (errors.is_empty()) {
@@ -1527,7 +1527,7 @@ void ScriptTextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
int row = pos.y;
int col = pos.x;
- tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
+ tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/move_caret_on_right_click"));
if (tx->is_move_caret_on_right_click_enabled()) {
if (tx->has_selection()) {
int from_line = tx->get_selection_from_line();
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index 29436e32b2..22ca5592bd 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -96,7 +96,7 @@ void ShaderTextEditor::set_warnings_panel(RichTextLabel *p_warnings_panel) {
void ShaderTextEditor::_load_theme_settings() {
CodeEdit *text_editor = get_text_editor();
- Color updated_marked_line_color = EDITOR_GET("text_editor/highlighting/mark_color");
+ Color updated_marked_line_color = EDITOR_GET("text_editor/theme/highlighting/mark_color");
if (updated_marked_line_color != marked_line_color) {
for (int i = 0; i < text_editor->get_line_count(); i++) {
if (text_editor->get_line_background_color(i) == marked_line_color) {
@@ -106,17 +106,17 @@ void ShaderTextEditor::_load_theme_settings() {
marked_line_color = updated_marked_line_color;
}
- syntax_highlighter->set_number_color(EDITOR_GET("text_editor/highlighting/number_color"));
- syntax_highlighter->set_symbol_color(EDITOR_GET("text_editor/highlighting/symbol_color"));
- syntax_highlighter->set_function_color(EDITOR_GET("text_editor/highlighting/function_color"));
- syntax_highlighter->set_member_variable_color(EDITOR_GET("text_editor/highlighting/member_variable_color"));
+ syntax_highlighter->set_number_color(EDITOR_GET("text_editor/theme/highlighting/number_color"));
+ syntax_highlighter->set_symbol_color(EDITOR_GET("text_editor/theme/highlighting/symbol_color"));
+ syntax_highlighter->set_function_color(EDITOR_GET("text_editor/theme/highlighting/function_color"));
+ syntax_highlighter->set_member_variable_color(EDITOR_GET("text_editor/theme/highlighting/member_variable_color"));
syntax_highlighter->clear_keyword_colors();
List<String> keywords;
ShaderLanguage::get_keyword_list(&keywords);
- const Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color");
- const Color control_flow_keyword_color = EDITOR_GET("text_editor/highlighting/control_flow_keyword_color");
+ const Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
+ const Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
for (const String &E : keywords) {
if (ShaderLanguage::is_control_flow_keyword(E)) {
@@ -142,14 +142,14 @@ void ShaderTextEditor::_load_theme_settings() {
}
}
- const Color member_variable_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
+ const Color member_variable_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
for (const String &E : built_ins) {
syntax_highlighter->add_keyword_color(E, member_variable_color);
}
// Colorize comments.
- const Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color");
+ const Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
syntax_highlighter->clear_color_regions();
syntax_highlighter->add_color_region("/*", "*/", comment_color, false);
syntax_highlighter->add_color_region("//", "", comment_color, true);
@@ -397,7 +397,7 @@ void ShaderEditor::_notification(int p_what) {
void ShaderEditor::_editor_settings_changed() {
shader_editor->update_editor_settings();
- shader_editor->get_text_editor()->add_theme_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/theme/line_spacing"));
+ shader_editor->get_text_editor()->add_theme_constant_override("line_spacing", EditorSettings::get_singleton()->get("text_editor/appearance/whitespace/line_spacing"));
shader_editor->get_text_editor()->set_draw_breakpoints_gutter(false);
shader_editor->get_text_editor()->set_draw_executing_lines_gutter(false);
}
@@ -483,7 +483,7 @@ void ShaderEditor::_check_for_external_edit() {
return;
}
- bool use_autoreload = bool(EDITOR_DEF("text_editor/files/auto_reload_scripts_on_external_change", false));
+ bool use_autoreload = bool(EDITOR_DEF("text_editor/behavior/files/auto_reload_scripts_on_external_change", false));
if (shader->get_last_modified_time() != FileAccess::get_modified_time(shader->get_path())) {
if (use_autoreload) {
_reload_shader_from_disk();
@@ -555,7 +555,7 @@ void ShaderEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
Point2i pos = tx->get_line_column_at_pos(mb->get_global_position() - tx->get_global_position());
int row = pos.y;
int col = pos.x;
- tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
+ tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/move_caret_on_right_click"));
if (tx->is_move_caret_on_right_click_enabled()) {
if (tx->has_selection()) {
diff --git a/editor/plugins/text_editor.cpp b/editor/plugins/text_editor.cpp
index cfccf90499..481eb84081 100644
--- a/editor/plugins/text_editor.cpp
+++ b/editor/plugins/text_editor.cpp
@@ -433,7 +433,7 @@ void TextEditor::_text_edit_gui_input(const Ref<InputEvent> &ev) {
int row = pos.y;
int col = pos.x;
- tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/cursor/right_click_moves_caret"));
+ tx->set_move_caret_on_right_click_enabled(EditorSettings::get_singleton()->get("text_editor/behavior/navigation/move_caret_on_right_click"));
bool can_fold = tx->can_fold_line(row);
bool is_folded = tx->is_line_folded(row);
diff --git a/editor/plugins/visual_shader_editor_plugin.cpp b/editor/plugins/visual_shader_editor_plugin.cpp
index 1fbf5eb0e6..2dd8270ee3 100644
--- a/editor/plugins/visual_shader_editor_plugin.cpp
+++ b/editor/plugins/visual_shader_editor_plugin.cpp
@@ -859,15 +859,15 @@ void VisualShaderGraphPlugin::add_node(VisualShader::Type p_type, int p_id) {
node->add_child(expression_box);
register_expression_edit(p_id, expression_box);
- Color background_color = EDITOR_GET("text_editor/highlighting/background_color");
- Color text_color = EDITOR_GET("text_editor/highlighting/text_color");
- Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color");
- Color control_flow_keyword_color = EDITOR_GET("text_editor/highlighting/control_flow_keyword_color");
- Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color");
- Color symbol_color = EDITOR_GET("text_editor/highlighting/symbol_color");
- Color function_color = EDITOR_GET("text_editor/highlighting/function_color");
- Color number_color = EDITOR_GET("text_editor/highlighting/number_color");
- Color members_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
+ Color background_color = EDITOR_GET("text_editor/theme/highlighting/background_color");
+ Color text_color = EDITOR_GET("text_editor/theme/highlighting/text_color");
+ Color keyword_color = EDITOR_GET("text_editor/theme/highlighting/keyword_color");
+ Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
+ Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
+ Color symbol_color = EDITOR_GET("text_editor/theme/highlighting/symbol_color");
+ Color function_color = EDITOR_GET("text_editor/theme/highlighting/function_color");
+ Color number_color = EDITOR_GET("text_editor/theme/highlighting/number_color");
+ Color members_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
expression_box->set_syntax_highlighter(expression_syntax_highlighter);
expression_box->add_theme_color_override("background_color", background_color);
@@ -3112,15 +3112,15 @@ void VisualShaderEditor::_notification(int p_what) {
preview_shader->set_icon(Control::get_theme_icon(SNAME("Shader"), SNAME("EditorIcons")));
{
- Color background_color = EDITOR_GET("text_editor/highlighting/background_color");
- Color text_color = EDITOR_GET("text_editor/highlighting/text_color");
+ Color background_color = EDITOR_GET("text_editor/theme/highlighting/background_color");
+ Color text_color = EDITOR_GET("text_editor/theme/highlighting/text_color");
Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color");
- Color control_flow_keyword_color = EDITOR_GET("text_editor/highlighting/control_flow_keyword_color");
- Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color");
- Color symbol_color = EDITOR_GET("text_editor/highlighting/symbol_color");
- Color function_color = EDITOR_GET("text_editor/highlighting/function_color");
- Color number_color = EDITOR_GET("text_editor/highlighting/number_color");
- Color members_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
+ Color control_flow_keyword_color = EDITOR_GET("text_editor/theme/highlighting/control_flow_keyword_color");
+ Color comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color");
+ Color symbol_color = EDITOR_GET("text_editor/theme/highlighting/symbol_color");
+ Color function_color = EDITOR_GET("text_editor/theme/highlighting/function_color");
+ Color number_color = EDITOR_GET("text_editor/theme/highlighting/number_color");
+ Color members_color = EDITOR_GET("text_editor/theme/highlighting/member_variable_color");
preview_text->add_theme_color_override("background_color", background_color);
@@ -3786,7 +3786,7 @@ void VisualShaderEditor::_update_preview() {
preview_text->set_line_background_color(i, Color(0, 0, 0, 0));
}
if (err != OK) {
- Color error_line_color = EDITOR_GET("text_editor/highlighting/mark_color");
+ Color error_line_color = EDITOR_GET("text_editor/theme/highlighting/mark_color");
preview_text->set_line_background_color(sl.get_error_line() - 1, error_line_color);
error_panel->show();
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 5c77c9f124..ee100ca938 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -59,7 +59,7 @@ void EditorSettingsDialog::_settings_property_edited(const String &p_name) {
if (full_name == "interface/theme/accent_color" || full_name == "interface/theme/base_color" || full_name == "interface/theme/contrast") {
EditorSettings::get_singleton()->set_manually("interface/theme/preset", "Custom"); // set preset to Custom
- } else if (full_name.begins_with("text_editor/highlighting")) {
+ } else if (full_name.begins_with("text_editor/theme/highlighting")) {
EditorSettings::get_singleton()->set_manually("text_editor/theme/color_theme", "Custom");
}
}