浏览代码

Merge pull request #79913 from bruvzg/lbl_min_h_line

[Label] Remove extra line spacing from Label minimum size calculations.
Yuri Sizov 2 年之前
父节点
当前提交
7305318a88
共有 1 个文件被更改,包括 3 次插入0 次删除
  1. 3 0
      scene/gui/label.cpp

+ 3 - 0
scene/gui/label.cpp

@@ -303,6 +303,9 @@ void Label::_update_visible() {
 			break;
 			break;
 		}
 		}
 	}
 	}
+	if (minsize.height > 0) {
+		minsize.height -= line_spacing;
+	}
 }
 }
 
 
 inline void draw_glyph(const Glyph &p_gl, const RID &p_canvas, const Color &p_font_color, const Vector2 &p_ofs) {
 inline void draw_glyph(const Glyph &p_gl, const RID &p_canvas, const Color &p_font_color, const Vector2 &p_ofs) {