Explorar o código

made Label (<span>) to obey size of container

Ivan Tivonenko %!s(int64=11) %!d(string=hai) anos
pai
achega
35063ef58c
Modificáronse 1 ficheiros con 1 adicións e 0 borrados
  1. 1 0
      h2d/comp/Label.hx

+ 1 - 0
h2d/comp/Label.hx

@@ -23,6 +23,7 @@ class Label extends Component {
 
 	override function resize( ctx : Context ) {
 		if( ctx.measure ) {
+            tf.maxWidth = ctx.maxWidth;
 			tf.font = getFont();
 			tf.textColor = style.color;
 			tf.text = text;