[html5] TextView height fix
This commit is contained in:
@@ -148,7 +148,11 @@ class TextView extends SpriteView implements ITextView<Sprite, TextField> {
|
|||||||
if (t != null) textField.text = t;
|
if (t != null) textField.text = t;
|
||||||
textField.setTextFormat(textFormat);
|
textField.setTextFormat(textFormat);
|
||||||
if (contentSize && !Std.is(skin, ISize)) {
|
if (contentSize && !Std.is(skin, ISize)) {
|
||||||
#if html5 textField.height = textField.textHeight; #end
|
#if html5
|
||||||
|
var h = textField.textHeight;
|
||||||
|
if (h > textFormat.size * 1.5) h = h / 2;
|
||||||
|
textField.height = h;
|
||||||
|
#end
|
||||||
width = textField.width + paddings * 2;
|
width = textField.width + paddings * 2;
|
||||||
height = textField.height + paddings * 2;
|
height = textField.height + paddings * 2;
|
||||||
textField.x = paddings;
|
textField.x = paddings;
|
||||||
|
|||||||
Reference in New Issue
Block a user