From f792f63b030ad2306c0407492f03fd9508b70766 Mon Sep 17 00:00:00 2001 From: volzhs Date: Mon, 6 Jun 2016 00:09:02 +0900 Subject: [PATCH] Fix min size bug of Label caused by #5030 --- scene/gui/label.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 8652aab6492..09c6a77b42e 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -488,9 +488,9 @@ void Label::regenerate_word_cache() { if (!autowrap) { minsize.width=width; if (max_lines_visible > 0 && line_count > max_lines_visible) { - minsize.height=(font->get_height() * max_lines_visible) + (line_spacing * (max_lines_visible - 1)); + minsize.height=(font->get_height()+line_spacing)*max_lines_visible; } else { - minsize.height=(font->get_height() * line_count)+(line_spacing * (line_count - 1)); + minsize.height=(font->get_height()+line_spacing)*line_count; } }