From ef4c14e550fc7cb16532faf593fab61f61fcfa4e Mon Sep 17 00:00:00 2001 From: M57 <41645758+Hy4ri@users.noreply.github.com> Date: Fri, 26 Jun 2026 13:04:01 +0300 Subject: [PATCH] fix(#373): compact full-width chat input bar (#394) * fix(#373): compact full-width chat input bar * fix(#373): replace contentPadding with Modifier.padding for backward API compat --------- Co-authored-by: M57 --- .../m57/hermescontrol/ui/chat/ChatScreen.kt | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatScreen.kt b/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatScreen.kt index 8aed5788..25773b06 100644 --- a/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatScreen.kt +++ b/app/src/main/java/com/m57/hermescontrol/ui/chat/ChatScreen.kt @@ -379,7 +379,7 @@ private fun ChatInputBar( modifier = Modifier .fillMaxWidth() - .padding(horizontal = 12.dp, vertical = 8.dp), + .padding(horizontal = 4.dp, vertical = 4.dp), shape = RoundedCornerShape(24.dp), colors = CardDefaults.cardColors( @@ -470,8 +470,8 @@ private fun ChatInputBar( modifier = Modifier .fillMaxWidth() - .padding(horizontal = 12.dp, vertical = 8.dp), - verticalAlignment = Alignment.Bottom, + .padding(horizontal = 8.dp, vertical = 4.dp), + verticalAlignment = Alignment.CenterVertically, ) { OutlinedTextField( value = inputText, @@ -479,7 +479,8 @@ private fun ChatInputBar( modifier = Modifier .weight(1f) - .heightIn(max = 140.dp) + .heightIn(min = 36.dp, max = 120.dp) + .padding(horizontal = 12.dp, vertical = 8.dp) .testTag("chat_input"), placeholder = { Text( @@ -490,10 +491,12 @@ private fun ChatInputBar( } else { stringResource(R.string.chat_input_placeholder_type_message) }, + style = MaterialTheme.typography.bodyMedium, ) }, enabled = isConnected, - maxLines = 5, + singleLine = false, + maxLines = 4, shape = RoundedCornerShape(20.dp), colors = OutlinedTextFieldDefaults.colors( @@ -503,7 +506,7 @@ private fun ChatInputBar( ), ) - Spacer(modifier = Modifier.width(8.dp)) + Spacer(modifier = Modifier.width(6.dp)) if (isAgentTyping) { // Interrupt button @@ -511,7 +514,7 @@ private fun ChatInputBar( onClick = onInterrupt, modifier = Modifier - .size(48.dp) + .size(40.dp) .testTag("interrupt_button"), shape = CircleShape, contentPadding = PaddingValues(0.dp), @@ -529,7 +532,7 @@ private fun ChatInputBar( enabled = canSend, modifier = Modifier - .size(48.dp) + .size(40.dp) .testTag("send_button"), shape = CircleShape, contentPadding = PaddingValues(0.dp),