소스 검색

Fix blank non-autowrapping labels

Pedro J. Estébanez 2 년 전
부모
커밋
3ccabee9ae
1개의 변경된 파일4개의 추가작업 그리고 0개의 파일을 삭제
  1. 4 0
      scene/gui/label.cpp

+ 4 - 0
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) {