Merge pull request #5132 from godotengine/revert-5052-fix-label-min-size
Revert "Fix min size bug of Label"
This commit is contained in:
commit
ae1e43afef
|
@ -488,9 +488,9 @@ void Label::regenerate_word_cache() {
|
||||||
if (!autowrap) {
|
if (!autowrap) {
|
||||||
minsize.width=width;
|
minsize.width=width;
|
||||||
if (max_lines_visible > 0 && line_count > max_lines_visible) {
|
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 {
|
} else {
|
||||||
minsize.height=(font->get_height()+line_spacing)*line_count;
|
minsize.height=(font->get_height() * line_count)+(line_spacing * (line_count - 1));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue