diff options
author | RĂ©mi Verschelde <remi@verschelde.fr> | 2023-02-13 19:14:51 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 19:14:51 +0100 |
commit | 1ecf486ef0a0e58ca7df6f84fb324b5766c66614 (patch) | |
tree | cb1cb9ea95b68ac09006792fbd65bd022f44ed59 | |
parent | cf859db34a6e3fa65c2200502a957d3981b4dbd4 (diff) | |
parent | 3ccabee9ae8f261aa7b0110482fbb5d2500d2e38 (diff) |
Merge pull request #73234 from RandomShaper/fix_label_sizing
Fix blank non-autowrapping labels
-rw-r--r-- | scene/gui/label.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp index 829f4cc643..c0ef71ee4f 100644 --- a/scene/gui/label.cpp +++ b/scene/gui/label.cpp @@ -177,6 +177,10 @@ void Label::_shape() { minsize.width = TS->shaped_text_get_size(lines_rid[i]).x; } } + + // With autowrap off, by now we already know the width the label will take. + width = (minsize.width - style->get_minimum_size().width); + width_stabilized = true; } if (lines_dirty && width_stabilized) { |