diff options
| author | sanikoyes <sanikoyes@163.com> | 2016-06-04 18:10:11 +0800 |
|---|---|---|
| committer | sanikoyes <sanikoyes@163.com> | 2016-06-04 18:10:11 +0800 |
| commit | 5f7b42cb874764b9e23724ed4a99c1b165b84f8a (patch) | |
| tree | 413d7b5953b1e77f854bfd1651a1008bfe8980ce /scene/gui/label.cpp | |
| parent | f32f4671542839495c5fbf18f3460eae8d0499f2 (diff) | |
| download | redot-engine-5f7b42cb874764b9e23724ed4a99c1b165b84f8a.tar.gz | |
fix line_edit&label get min size bug
fix line_edit draw char(x ofs_max)
Diffstat (limited to 'scene/gui/label.cpp')
| -rw-r--r-- | scene/gui/label.cpp | 4 |
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)); } } |
