mirror of
https://github.com/godotengine/godot.git
synced 2025-01-27 20:30:54 +00:00
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
@ -35,9 +35,17 @@
|
|||||||
|
|
||||||
void Label::set_autowrap(bool p_autowrap) {
|
void Label::set_autowrap(bool p_autowrap) {
|
||||||
|
|
||||||
|
if (autowrap == p_autowrap) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
autowrap = p_autowrap;
|
autowrap = p_autowrap;
|
||||||
word_cache_dirty = true;
|
word_cache_dirty = true;
|
||||||
update();
|
update();
|
||||||
|
|
||||||
|
if (clip) {
|
||||||
|
minimum_size_changed();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
bool Label::has_autowrap() const {
|
bool Label::has_autowrap() const {
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user