Remove empty terminal black areas
- Hide the terminal output viewport when there are no output lines on a newly loaded level. - Reduce the minimum output history height so short output does not create a large empty black panel. - Use the pane surface color for the app background so normal spacing between cards is not black.
This commit is contained in:
@@ -19,8 +19,8 @@ android {
|
||||
applicationId = "solutions.tretter.githugandroid"
|
||||
minSdk = 26
|
||||
targetSdk = 35
|
||||
versionCode = 140
|
||||
versionName = "0.1.139"
|
||||
versionCode = 141
|
||||
versionName = "0.1.140"
|
||||
|
||||
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
|
||||
vectorDrawables.useSupportLibrary = true
|
||||
|
||||
@@ -3,10 +3,10 @@ package solutions.tretter.githugandroid
|
||||
import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.ui.graphics.Color
|
||||
|
||||
val AppBackground = Color(0xFF000000)
|
||||
val PanelPrimary = Color(0xFF121212)
|
||||
val PanelSecondary = Color(0xFF1E1E1E)
|
||||
val PanelTertiary = Color(0xFF262626)
|
||||
val AppBackground = PanelSecondary
|
||||
val TerminalBackground = Color(0xFF050505)
|
||||
val TextPrimary = Color(0xFFFFFFFF)
|
||||
val TextSecondary = Color(0xFFE6E6E6)
|
||||
|
||||
@@ -82,7 +82,11 @@ fun TerminalPane(
|
||||
val reservedControlsHeight = 86.dp
|
||||
val maxOutputHeight = (terminalPaneMaxHeight - reservedControlsHeight).coerceAtLeast(120.dp)
|
||||
val outputLineHeight = 20.dp
|
||||
val desiredOutputHeight = (output.size.coerceAtLeast(6) * outputLineHeight.value).dp.coerceAtMost(maxOutputHeight)
|
||||
val hasOutput = output.isNotEmpty()
|
||||
val desiredOutputHeight = (output.size.coerceAtLeast(1) * outputLineHeight.value)
|
||||
.dp
|
||||
.coerceAtLeast(48.dp)
|
||||
.coerceAtMost(maxOutputHeight)
|
||||
|
||||
LaunchedEffect(inputFieldVersion) {
|
||||
outputHorizontalScroll.scrollTo(0)
|
||||
@@ -120,9 +124,10 @@ fun TerminalPane(
|
||||
.widthIn(min = terminalMinWidth),
|
||||
verticalArrangement = Arrangement.spacedBy(8.dp),
|
||||
) {
|
||||
if (hasOutput) {
|
||||
Box(
|
||||
modifier = Modifier
|
||||
.heightIn(min = 200.dp, max = maxOutputHeight)
|
||||
.heightIn(max = maxOutputHeight)
|
||||
.height(desiredOutputHeight)
|
||||
.fillMaxWidth()
|
||||
.background(PanelPrimary, RoundedCornerShape(10.dp))
|
||||
@@ -146,6 +151,7 @@ fun TerminalPane(
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
SpecialKeyBar(
|
||||
onTab = onTab,
|
||||
onHelp = onHelp,
|
||||
|
||||
Reference in New Issue
Block a user