summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHugo Locurcio <hugo.locurcio@hugo.pro>2022-03-21 02:00:58 +0100
committerHugo Locurcio <hugo.locurcio@hugo.pro>2022-03-21 02:00:58 +0100
commit6d4514c95e88acabd88fb5c426ed7a422fcf070a (patch)
tree1cc631a3c201570c915c459d49da75fdc21b1552
parenta8e3b5ef25270764615a0d64f06339bead2c1fc1 (diff)
Decrease the default line spacing in the script editor
This brings the level of line spacing closer to what it was like in Godot 3.x, which improves usability on small displays. This also decreases the default line spacing for fixed-width texts in the About dialog (license text).
-rw-r--r--editor/editor_about.cpp4
-rw-r--r--editor/editor_settings.cpp2
2 files changed, 3 insertions, 3 deletions
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index 9b6e2698b6..5beda7d907 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -43,10 +43,10 @@ void EditorAbout::_theme_changed() {
const int font_size = get_theme_font_size(SNAME("source_size"), SNAME("EditorFonts"));
_tpl_text->add_theme_font_override("normal_font", font);
_tpl_text->add_theme_font_size_override("normal_font_size", font_size);
- _tpl_text->add_theme_constant_override("line_separation", 6 * EDSCALE);
+ _tpl_text->add_theme_constant_override("line_separation", 4 * EDSCALE);
_license_text->add_theme_font_override("normal_font", font);
_license_text->add_theme_font_size_override("normal_font_size", font_size);
- _license_text->add_theme_constant_override("line_separation", 6 * EDSCALE);
+ _license_text->add_theme_constant_override("line_separation", 4 * EDSCALE);
_logo->set_texture(get_theme_icon(SNAME("Logo"), SNAME("EditorIcons")));
}
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 2d80fe85f8..bd6cfde931 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -535,7 +535,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
// Appearance: Whitespace
_initial_set("text_editor/appearance/whitespace/draw_tabs", true);
_initial_set("text_editor/appearance/whitespace/draw_spaces", false);
- EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/whitespace/line_spacing", 6, "0,50,1")
+ EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/whitespace/line_spacing", 4, "0,50,1")
// Behavior
// Behavior: Navigation