Skip to content

Commit

Permalink
Fix blank non-autowrapping labels
Browse files Browse the repository at this point in the history
  • Loading branch information
RandomShaper committed Feb 13, 2023
1 parent 4a2c217 commit 3ccabee
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scene/gui/label.cpp
Expand Up @@ -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) {
Expand Down

0 comments on commit 3ccabee

Please sign in to comment.