Update minimum size on Label::set_autowrap
If `clip_text` is true, the minimum height is one line if `autowrap` is true , or one pixel otherwise.
This commit is contained in:
parent
83d950b58e
commit
fbd937bd30
1 changed files with 8 additions and 0 deletions
|
@ -35,9 +35,17 @@
|
|||
|
||||
void Label::set_autowrap(bool p_autowrap) {
|
||||
|
||||
if (autowrap == p_autowrap) {
|
||||
return;
|
||||
}
|
||||
|
||||
autowrap = p_autowrap;
|
||||
word_cache_dirty = true;
|
||||
update();
|
||||
|
||||
if (clip) {
|
||||
minimum_size_changed();
|
||||
}
|
||||
}
|
||||
bool Label::has_autowrap() const {
|
||||
|
||||
|
|
Loading…
Reference in a new issue