浏览代码

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.
Hugo Locurcio 7 年之前
父节点
当前提交
f8a2cb3e15
共有 1 个文件被更改,包括 4 次插入0 次删除
  1. 4 0
      scene/gui/text_edit.cpp

+ 4 - 0
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");