fix: center text and icons vertically in input capsule
Column gets heightIn(min=64dp) + Arrangement.Center so content sits in the middle. Placeholder maxLines=1 to prevent overflow dots.
This commit is contained in:
parent
1d47e05dbf
commit
9f7e3fb8b0
1 changed files with 5 additions and 2 deletions
|
|
@ -758,7 +758,10 @@ fun ChatInput(
|
||||||
shadowStack = KaizenShadows.level4,
|
shadowStack = KaizenShadows.level4,
|
||||||
cornerRadius = 34.dp,
|
cornerRadius = 34.dp,
|
||||||
) {
|
) {
|
||||||
Column {
|
Column(
|
||||||
|
Modifier.heightIn(min = 64.dp),
|
||||||
|
verticalArrangement = Arrangement.Center,
|
||||||
|
) {
|
||||||
if (isRecording) {
|
if (isRecording) {
|
||||||
Column(Modifier.padding(horizontal = 14.dp)) {
|
Column(Modifier.padding(horizontal = 14.dp)) {
|
||||||
VoiceWaveform(amplitude = recordingAmplitude)
|
VoiceWaveform(amplitude = recordingAmplitude)
|
||||||
|
|
@ -809,7 +812,6 @@ fun ChatInput(
|
||||||
Row(
|
Row(
|
||||||
Modifier
|
Modifier
|
||||||
.fillMaxWidth()
|
.fillMaxWidth()
|
||||||
.heightIn(min = 64.dp)
|
|
||||||
.padding(start = 10.dp, end = 8.dp),
|
.padding(start = 10.dp, end = 8.dp),
|
||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
) {
|
) {
|
||||||
|
|
@ -829,6 +831,7 @@ fun ChatInput(
|
||||||
color = cs.onSurfaceVariant.copy(alpha = 0.38f),
|
color = cs.onSurfaceVariant.copy(alpha = 0.38f),
|
||||||
fontSize = 16.sp,
|
fontSize = 16.sp,
|
||||||
fontWeight = FontWeight.W300,
|
fontWeight = FontWeight.W300,
|
||||||
|
maxLines = 1,
|
||||||
)
|
)
|
||||||
BasicTextField(
|
BasicTextField(
|
||||||
value = value, onValueChange = onValueChange,
|
value = value, onValueChange = onValueChange,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue