Fix InputTextField size

This commit is contained in:
Sad Ellie 2023-09-27 15:22:21 +03:00
parent c8b11a4b02
commit 407db4aeee
2 changed files with 5 additions and 7 deletions

View File

@ -197,7 +197,7 @@ private fun AutoSizableTextField(
) {
with(density) {
// Cursor handle is not visible without this, 0.836f is the minimum required factor here
nFontSize = maxHeight.toSp() * 0.835f
nFontSize = maxHeight.toSp() * 0.83f
minFontSize = nFontSize * minRatio
}

View File

@ -20,7 +20,6 @@ package com.sadellie.unitto.feature.calculator.components
import android.content.res.Configuration
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Arrangement
import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.fillMaxWidth
@ -67,13 +66,12 @@ fun TextBox(
bottomStartPercent = 20, bottomEndPercent = 20
)
)
.padding(top = 12.dp),
.padding(top = 4.dp),
horizontalAlignment = Alignment.CenterHorizontally,
verticalArrangement = Arrangement.spacedBy(8.dp)
) {
ExpressionTextField(
modifier = Modifier
.weight(2f)
.weight(3f)
.fillMaxWidth()
.padding(horizontal = 8.dp),
value = input,
@ -92,7 +90,7 @@ fun TextBox(
ExpressionTextField(
modifier = Modifier
.weight(1f)
.weight(2f)
.fillMaxWidth()
.padding(horizontal = 8.dp),
value = outputTF,
@ -109,7 +107,7 @@ fun TextBox(
UnformattedTextField(
modifier = Modifier
.weight(1f)
.weight(2f)
.fillMaxWidth()
.padding(horizontal = 8.dp),
value = TextFieldValue(label),