diff options
author | Max Hilbrunner <mhilbrunner@users.noreply.github.com> | 2019-05-17 20:38:40 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-05-17 20:38:40 +0200 |
commit | ee5ba3e0974caba3e3589d2a53405ef7328dc1b1 (patch) | |
tree | f766d1b13f6ebf180bd09f5c720b0a1bff287399 /editor | |
parent | 580b0c651df86675145a696b1e961b224bf3ad8c (diff) | |
parent | c86b03abd8860c5963f1e694257a2231cea96d85 (diff) |
Merge pull request #28366 from iwek7/feature/issue28355/showSpacesInEditor
Add feature to show spaces in code editor
Diffstat (limited to 'editor')
-rw-r--r-- | editor/code_editor.cpp | 1 | ||||
-rw-r--r-- | editor/editor_settings.cpp | 1 | ||||
-rw-r--r-- | editor/editor_themes.cpp | 1 | ||||
-rw-r--r-- | editor/icons/icon_GUI_space.svg | 71 |
4 files changed, 74 insertions, 0 deletions
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp index ec984e480a..7fd7b8dac3 100644 --- a/editor/code_editor.cpp +++ b/editor/code_editor.cpp @@ -755,6 +755,7 @@ void CodeTextEditor::update_editor_settings() { text_editor->set_indent_size(EditorSettings::get_singleton()->get("text_editor/indent/size")); text_editor->set_auto_indent(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_show_line_numbers(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_numbers")); text_editor->set_line_numbers_zero_padded(EditorSettings::get_singleton()->get("text_editor/line_numbers/line_numbers_zero_padded")); text_editor->set_show_line_length_guideline(EditorSettings::get_singleton()->get("text_editor/line_numbers/show_line_length_guideline")); diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp index 8f26663f81..193b2b7a88 100644 --- a/editor/editor_settings.cpp +++ b/editor/editor_settings.cpp @@ -425,6 +425,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) { _initial_set("text_editor/indent/auto_indent", true); _initial_set("text_editor/indent/convert_indent_on_save", false); _initial_set("text_editor/indent/draw_tabs", true); + _initial_set("text_editor/indent/draw_spaces", false); // Line numbers _initial_set("text_editor/line_numbers/show_line_numbers", true); diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp index e1addaa532..ba4dd9d7e2 100644 --- a/editor/editor_themes.cpp +++ b/editor/editor_themes.cpp @@ -833,6 +833,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) { theme->set_stylebox("read_only", "TextEdit", style_widget_disabled); theme->set_constant("side_margin", "TabContainer", 0); theme->set_icon("tab", "TextEdit", theme->get_icon("GuiTab", "EditorIcons")); + theme->set_icon("space", "TextEdit", theme->get_icon("GuiSpace", "EditorIcons")); theme->set_icon("folded", "TextEdit", theme->get_icon("GuiTreeArrowRight", "EditorIcons")); theme->set_icon("fold", "TextEdit", theme->get_icon("GuiTreeArrowDown", "EditorIcons")); theme->set_color("font_color", "TextEdit", font_color); diff --git a/editor/icons/icon_GUI_space.svg b/editor/icons/icon_GUI_space.svg new file mode 100644 index 0000000000..caa4565f4a --- /dev/null +++ b/editor/icons/icon_GUI_space.svg @@ -0,0 +1,71 @@ +<?xml version="1.0" encoding="UTF-8" standalone="no"?> +<svg + xmlns:dc="http://purl.org/dc/elements/1.1/" + xmlns:cc="http://creativecommons.org/ns#" + xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" + xmlns:svg="http://www.w3.org/2000/svg" + xmlns="http://www.w3.org/2000/svg" + xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd" + xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape" + width="8" + height="8" + version="1.1" + viewBox="0 0 8 7.9999993" + id="svg98" + sodipodi:docname="icon_GUI_space.svg" + inkscape:version="0.92.4 (unknown)"> + <metadata + id="metadata104"> + <rdf:RDF> + <cc:Work + rdf:about=""> + <dc:format>image/svg+xml</dc:format> + <dc:type + rdf:resource="http://purl.org/dc/dcmitype/StillImage" /> + <dc:title></dc:title> + </cc:Work> + </rdf:RDF> + </metadata> + <defs + id="defs102"> + <inkscape:perspective + sodipodi:type="inkscape:persp3d" + inkscape:vp_x="0 : 3.9999996 : 1" + inkscape:vp_y="0 : 1000 : 0" + inkscape:vp_z="8 : 3.9999996 : 1" + inkscape:persp3d-origin="4 : 2.6666664 : 1" + id="perspective992" /> + </defs> + <sodipodi:namedview + pagecolor="#ffffff" + bordercolor="#666666" + borderopacity="1" + objecttolerance="10" + gridtolerance="10" + guidetolerance="10" + inkscape:pageopacity="0" + inkscape:pageshadow="2" + inkscape:window-width="1853" + inkscape:window-height="1025" + id="namedview100" + showgrid="false" + inkscape:zoom="70.333333" + inkscape:cx="3.4905213" + inkscape:cy="6" + inkscape:window-x="67" + inkscape:window-y="27" + inkscape:window-maximized="1" + inkscape:current-layer="svg98" + inkscape:pagecheckerboard="true" /> + <g + transform="matrix(0.5,0,0,-0.5,1,527.20001)" + id="g96" + style="fill:#ffffff;fill-opacity:0.19607843"> + <circle + cx="6" + cy="1046.4" + r="3" + id="circle94" + style="fill:#ffffff;fill-opacity:0.19607843" /> + </g> +</svg> |