浏览代码

Merge pull request #49011 from KoBeWi/totally_h

Fix valign with stylebox borders
Rémi Verschelde 4 年之前
父节点
当前提交
1129439f09
共有 1 个文件被更改,包括 1 次插入0 次删除
  1. 1 0
      scene/gui/label.cpp

+ 1 - 0
scene/gui/label.cpp

@@ -217,6 +217,7 @@ void Label::_notification(int p_what) {
 		for (int64_t i = lines_skipped; i < last_line; i++) {
 			total_h += TS->shaped_text_get_size(lines_rid[i]).y + font->get_spacing(Font::SPACING_TOP) + font->get_spacing(Font::SPACING_BOTTOM) + line_spacing;
 		}
+		total_h += style->get_margin(SIDE_TOP) + style->get_margin(SIDE_BOTTOM);
 
 		int vbegin = 0, vsep = 0;
 		if (lines_visible > 0) {