Fix terminal pane height with soft keyboard

- Make pane containers wrap their content instead of filling the IME-adjusted viewport.
- Make the terminal surface content-height driven so it no longer expands into a large black area above the keyboard.
This commit is contained in:
Joe Tretter
2026-05-13 15:15:40 -05:00
parent 61951408de
commit 0fb73f869c
3 changed files with 16 additions and 10 deletions

View File

@@ -6,7 +6,6 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.PaddingValues
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.wrapContentHeight
@@ -35,7 +34,9 @@ fun PaneWorkspace(
terminalContent: @Composable () -> Unit,
) {
Column(
modifier = modifier.fillMaxSize(),
modifier = modifier
.fillMaxWidth()
.wrapContentHeight(),
verticalArrangement = Arrangement.spacedBy(0.dp),
) {
paneLayout.order.forEachIndexed { index, paneId ->
@@ -89,7 +90,11 @@ private fun PaneCard(
colors = CardDefaults.cardColors(containerColor = PanelSecondary),
shape = RoundedCornerShape(16.dp),
) {
Column(modifier = Modifier.fillMaxSize()) {
Column(
modifier = Modifier
.fillMaxWidth()
.wrapContentHeight(),
) {
PaneHeader(
paneId = paneId,
collapsed = false,
@@ -101,7 +106,8 @@ private fun PaneCard(
)
Box(
modifier = Modifier
.fillMaxSize()
.fillMaxWidth()
.wrapContentHeight()
.padding(horizontal = 12.dp, vertical = 10.dp),
) {
content()

View File

@@ -9,14 +9,13 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.Column
import androidx.compose.foundation.layout.Row
import androidx.compose.foundation.layout.RowScope
import androidx.compose.foundation.layout.fillMaxHeight
import androidx.compose.foundation.layout.fillMaxSize
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.height
import androidx.compose.foundation.layout.heightIn
import androidx.compose.foundation.layout.padding
import androidx.compose.foundation.layout.width
import androidx.compose.foundation.layout.widthIn
import androidx.compose.foundation.layout.wrapContentHeight
import androidx.compose.foundation.rememberScrollState
import androidx.compose.foundation.shape.RoundedCornerShape
import androidx.compose.foundation.text.BasicTextField
@@ -110,13 +109,14 @@ fun TerminalPane(
Box(
modifier = Modifier
.fillMaxSize()
.fillMaxWidth()
.wrapContentHeight()
.background(TerminalBackground, RoundedCornerShape(12.dp))
.padding(8.dp)
) {
Column(
modifier = Modifier
.fillMaxHeight()
.fillMaxWidth()
.widthIn(min = terminalMinWidth),
verticalArrangement = Arrangement.spacedBy(8.dp),
) {