Merge pull request #73234 from RandomShaper/fix_label_sizing

Fix blank non-autowrapping labels
This commit is contained in:
Rémi Verschelde 2023-02-13 19:14:51 +01:00 committed by GitHub
commit 1ecf486ef0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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) {