1
0
Fork 0

Merge pull request #99915 from bruvzg/lbl_width

[Label] Fix min. width
This commit is contained in:
Rémi Verschelde 2024-12-02 15:52:15 +01:00
commit eefd32ba16
No known key found for this signature in database
GPG Key ID: C3336907360768E1
1 changed files with 3 additions and 1 deletions

View File

@ -216,9 +216,11 @@ void Label::_shape() const {
bool lines_hidden = visible_lines > 0 && visible_lines < total_line_count;
int line_index = 0;
if (autowrap_mode == TextServer::AUTOWRAP_OFF) {
minsize.width = 0.0f;
}
for (Paragraph &para : paragraphs) {
if (autowrap_mode == TextServer::AUTOWRAP_OFF) {
minsize.width = 0.0f;
for (const RID &line_rid : para.lines_rid) {
if (minsize.width < TS->shaped_text_get_size(line_rid).x) {
minsize.width = TS->shaped_text_get_size(line_rid).x;