Skip to content

Commit 3ccabee

Browse files
committed
Fix blank non-autowrapping labels
1 parent 4a2c217 commit 3ccabee

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scene/gui/label.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -177,6 +177,10 @@ void Label::_shape() {
177177
minsize.width = TS->shaped_text_get_size(lines_rid[i]).x;
178178
}
179179
}
180+
181+
// With autowrap off, by now we already know the width the label will take.
182+
width = (minsize.width - style->get_minimum_size().width);
183+
width_stabilized = true;
180184
}
181185

182186
if (lines_dirty && width_stabilized) {

0 commit comments

Comments
 (0)