From 9bbad450450ebdadcff7785fee63e67f2d980400 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Sun, 30 Apr 2023 00:12:13 +0200 Subject: [PATCH] Allow negative line spacing for the script editor in Editor Settings This can be used to make text even more compact with certain fonts. --- doc/classes/EditorSettings.xml | 2 +- editor/settings/editor_settings.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 32bfbcb1e2..daff3aac71 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -1292,7 +1292,7 @@ If [code]true[/code], draws tab characters as chevrons. - The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying fewer lines on screen. + The space to add between lines (in pixels). Greater line spacing can help improve readability at the cost of displaying fewer lines on screen. Negative values allow for even more compact text, but may look broken with certain fonts. If [code]true[/code], documentation tooltips will appear when hovering over a symbol. diff --git a/editor/settings/editor_settings.cpp b/editor/settings/editor_settings.cpp index 8abb3bb20a..c173b3ee88 100644 --- a/editor/settings/editor_settings.cpp +++ b/editor/settings/editor_settings.cpp @@ -770,7 +770,7 @@ void EditorSettings::_load_defaults(Ref p_extra_config) { // Appearance: Whitespace _initial_set("text_editor/appearance/whitespace/draw_tabs", true, true); _initial_set("text_editor/appearance/whitespace/draw_spaces", false, true); - EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/whitespace/line_spacing", 4, "0,50,1") + EDITOR_SETTING(Variant::INT, PROPERTY_HINT_RANGE, "text_editor/appearance/whitespace/line_spacing", 4, "-10,50,1") // Behavior // Behavior: General