From f8a2cb3e15a4fec3ce4929db36f73ca1cb8309f8 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 26 Jul 2018 23:50:16 +0200 Subject: Multiply TextEdit line spacing by the editor scale This makes sure the default line spacing in the script editor is consistent with the editor scale in use. --- scene/gui/text_edit.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'scene/gui') diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp index 8926c1ec00..fa82c048ba 100644 --- a/scene/gui/text_edit.cpp +++ b/scene/gui/text_edit.cpp @@ -4328,7 +4328,11 @@ void TextEdit::_update_caches() { cache.search_result_border_color = get_color("search_result_border_color"); cache.symbol_color = get_color("symbol_color"); cache.background_color = get_color("background_color"); +#ifdef TOOLS_ENABLED + cache.line_spacing = get_constant("line_spacing") * EDSCALE; +#else cache.line_spacing = get_constant("line_spacing"); +#endif cache.row_height = cache.font->get_height() + cache.line_spacing; cache.tab_icon = get_icon("tab"); cache.folded_icon = get_icon("GuiTreeArrowRight", "EditorIcons"); -- cgit v1.2.3