Skip to content

Commit 445b8cb

Browse files
[core] Fix EditText
1 parent b5be9d4 commit 445b8cb

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

core/src/br/nullexcept/mux/widget/EditText.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -326,11 +326,11 @@ private void measureText(boolean force) {
326326
}
327327

328328
private void measureText(boolean force, int width, int height) {
329-
int mw = (int) (width - getPaddingLeft() - getPaddingRight() - paint.getFontMetrics().measureText(" "));
330-
int mh = (int) (width - getPaddingTop() - getPaddingBottom() - paint.getFontMetrics().measureText(" "));
329+
int mw = width - getPaddingLeft() - getPaddingRight();
330+
int mh = height - getPaddingTop() - getPaddingBottom();
331331
mw = Math.max(1, mw);
332332
mh = Math.max(1, mh);
333-
if (force || (textViewport.width != mw || textViewport.height != mw)) {
333+
if (force || (textViewport.width != mw || textViewport.height != mh)) {
334334
textViewport.set(mw,mh);
335335
textLayout.measure(mw,mh, getGravity());
336336
if (text.length() == 0) {

0 commit comments

Comments
 (0)