Fix min size bug of Label

caused by #5030
This commit is contained in:
volzhs 2016-06-06 00:09:02 +09:00
parent 64fd75d91a
commit f792f63b03
1 changed files with 2 additions and 2 deletions

View File

@ -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;
}
}