Skip to content

Commit

Permalink
[core] Fix EditText
Browse files Browse the repository at this point in the history
  • Loading branch information
GabrielBRDeveloper committed Aug 9, 2024
1 parent b5be9d4 commit 445b8cb
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/src/br/nullexcept/mux/widget/EditText.java
Original file line number Diff line number Diff line change
Expand Up @@ -326,11 +326,11 @@ private void measureText(boolean force) {
}

private void measureText(boolean force, int width, int height) {
int mw = (int) (width - getPaddingLeft() - getPaddingRight() - paint.getFontMetrics().measureText(" "));
int mh = (int) (width - getPaddingTop() - getPaddingBottom() - paint.getFontMetrics().measureText(" "));
int mw = width - getPaddingLeft() - getPaddingRight();
int mh = height - getPaddingTop() - getPaddingBottom();
mw = Math.max(1, mw);
mh = Math.max(1, mh);
if (force || (textViewport.width != mw || textViewport.height != mw)) {
if (force || (textViewport.width != mw || textViewport.height != mh)) {
textViewport.set(mw,mh);
textLayout.measure(mw,mh, getGravity());
if (text.length() == 0) {
Expand Down

0 comments on commit 445b8cb

Please sign in to comment.