summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-06-09 21:58:22 -0300
committerGitHub <noreply@github.com>2016-06-09 21:58:22 -0300
commitae1e43afef3eaa2c5dc0522e40d245672210a89e (patch)
tree75dd35d358952acc2f052b79000fafaac635fa20
parentf4ff30dff0468880c6b36c347e83ebacb9db2d5e (diff)
parent45d1ffd611de94377f99e54ae7ca355b2b23afc9 (diff)
Merge pull request #5132 from godotengine/revert-5052-fix-label-min-size
Revert "Fix min size bug of Label"
-rw-r--r--scene/gui/label.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 09c6a77b42..8652aab649 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()+line_spacing)*max_lines_visible;
+ minsize.height=(font->get_height() * max_lines_visible) + (line_spacing * (max_lines_visible - 1));
} else {
- minsize.height=(font->get_height()+line_spacing)*line_count;
+ minsize.height=(font->get_height() * line_count)+(line_spacing * (line_count - 1));
}
}