| 1105 | } |
| 1106 | |
| 1107 | void CodeTextEditor::update_editor_settings() { |
| 1108 | // Theme: Highlighting |
| 1109 | completion_font_color = EDITOR_GET("text_editor/theme/highlighting/completion_font_color"); |
| 1110 | completion_string_color = EDITOR_GET("text_editor/theme/highlighting/string_color"); |
| 1111 | completion_string_name_color = EDITOR_GET("text_editor/theme/highlighting/gdscript/string_name_color"); |
| 1112 | completion_node_path_color = EDITOR_GET("text_editor/theme/highlighting/gdscript/node_path_color"); |
| 1113 | completion_comment_color = EDITOR_GET("text_editor/theme/highlighting/comment_color"); |
| 1114 | completion_doc_comment_color = EDITOR_GET("text_editor/theme/highlighting/doc_comment_color"); |
| 1115 | |
| 1116 | // Appearance: Caret |
| 1117 | text_editor->set_caret_type((TextEdit::CaretType)EDITOR_GET("text_editor/appearance/caret/type").operator int()); |
| 1118 | text_editor->set_caret_blink_enabled(EDITOR_GET("text_editor/appearance/caret/caret_blink")); |
| 1119 | text_editor->set_caret_blink_interval(EDITOR_GET("text_editor/appearance/caret/caret_blink_interval")); |
| 1120 | text_editor->set_highlight_current_line(EDITOR_GET("text_editor/appearance/caret/highlight_current_line")); |
| 1121 | text_editor->set_highlight_all_occurrences(EDITOR_GET("text_editor/appearance/caret/highlight_all_occurrences")); |
| 1122 | |
| 1123 | // Appearance: Gutters |
| 1124 | text_editor->set_draw_line_numbers(EDITOR_GET("text_editor/appearance/gutters/show_line_numbers")); |
| 1125 | text_editor->set_line_numbers_zero_padded(EDITOR_GET("text_editor/appearance/gutters/line_numbers_zero_padded")); |
| 1126 | |
| 1127 | // Appearance: Minimap |
| 1128 | text_editor->set_draw_minimap(EDITOR_GET("text_editor/appearance/minimap/show_minimap")); |
| 1129 | text_editor->set_minimap_width((int)EDITOR_GET("text_editor/appearance/minimap/minimap_width") * EDSCALE); |
| 1130 | |
| 1131 | // Appearance: Lines |
| 1132 | text_editor->set_line_folding_enabled(EDITOR_GET("text_editor/appearance/lines/code_folding")); |
| 1133 | text_editor->set_draw_fold_gutter(EDITOR_GET("text_editor/appearance/lines/code_folding")); |
| 1134 | text_editor->set_line_wrapping_mode((TextEdit::LineWrappingMode)EDITOR_GET("text_editor/appearance/lines/word_wrap").operator int()); |
| 1135 | text_editor->set_autowrap_mode((TextServer::AutowrapMode)EDITOR_GET("text_editor/appearance/lines/autowrap_mode").operator int()); |
| 1136 | |
| 1137 | // Appearance: Whitespace |
| 1138 | text_editor->set_draw_tabs(EDITOR_GET("text_editor/appearance/whitespace/draw_tabs")); |
| 1139 | text_editor->set_draw_spaces(EDITOR_GET("text_editor/appearance/whitespace/draw_spaces")); |
| 1140 | text_editor->add_theme_constant_override("line_spacing", EDITOR_GET("text_editor/appearance/whitespace/line_spacing")); |
| 1141 | |
| 1142 | // Behavior: General |
| 1143 | text_editor->set_empty_selection_clipboard_enabled(EDITOR_GET("text_editor/behavior/general/empty_selection_clipboard")); |
| 1144 | |
| 1145 | // Behavior: Navigation |
| 1146 | text_editor->set_scroll_past_end_of_file_enabled(EDITOR_GET("text_editor/behavior/navigation/scroll_past_end_of_file")); |
| 1147 | text_editor->set_smooth_scroll_enabled(EDITOR_GET("text_editor/behavior/navigation/smooth_scrolling")); |
| 1148 | text_editor->set_v_scroll_speed(EDITOR_GET("text_editor/behavior/navigation/v_scroll_speed")); |
| 1149 | text_editor->set_drag_and_drop_selection_enabled(EDITOR_GET("text_editor/behavior/navigation/drag_and_drop_selection")); |
| 1150 | text_editor->set_use_default_word_separators(EDITOR_GET("text_editor/behavior/navigation/use_default_word_separators")); |
| 1151 | text_editor->set_use_custom_word_separators(EDITOR_GET("text_editor/behavior/navigation/use_custom_word_separators")); |
| 1152 | text_editor->set_custom_word_separators(EDITOR_GET("text_editor/behavior/navigation/custom_word_separators")); |
| 1153 | |
| 1154 | // Behavior: Indent |
| 1155 | set_indent_using_spaces(EDITOR_GET("text_editor/behavior/indent/type")); |
| 1156 | text_editor->set_indent_size(EDITOR_GET("text_editor/behavior/indent/size")); |
| 1157 | text_editor->set_auto_indent_enabled(EDITOR_GET("text_editor/behavior/indent/auto_indent")); |
| 1158 | text_editor->set_indent_wrapped_lines(EDITOR_GET("text_editor/behavior/indent/indent_wrapped_lines")); |
| 1159 | |
| 1160 | // Completion |
| 1161 | text_editor->set_auto_brace_completion_enabled(EDITOR_GET("text_editor/completion/auto_brace_complete")); |
| 1162 | text_editor->set_code_hint_draw_below(EDITOR_GET("text_editor/completion/put_callhint_tooltip_below_current_line")); |
| 1163 | code_complete_enabled = EDITOR_GET("text_editor/completion/code_complete_enabled"); |
| 1164 | code_complete_timer->set_wait_time(EDITOR_GET("text_editor/completion/code_complete_delay")); |
no test coverage detected