Unify Git editor presentation

- place Save before Dismiss in Git-backed editors
- rename the Git editor Close action to Dismiss
- match Git editor dialog and content sizing to the vi file editor
This commit is contained in:
Joe Tretter
2026-06-08 14:38:10 -05:00
parent 02a23694c3
commit 06c60356e5
2 changed files with 6 additions and 6 deletions

View File

@@ -19,8 +19,8 @@ android {
applicationId = "solutions.tretter.githugandroid"
minSdk = 26
targetSdk = 35
versionCode = 168
versionName = "0.1.167"
versionCode = 169
versionName = "0.1.168"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true

View File

@@ -76,7 +76,7 @@ fun GitMessageEditorDialog(
Surface(
modifier = Modifier
.fillMaxWidth()
.heightIn(min = 320.dp, max = 620.dp),
.heightIn(min = 360.dp, max = 720.dp),
color = PanelPrimary,
shape = RoundedCornerShape(8.dp),
) {
@@ -94,8 +94,8 @@ fun GitMessageEditorDialog(
modifier = Modifier.fillMaxWidth(),
horizontalArrangement = Arrangement.spacedBy(8.dp),
) {
EditorButton(label = "Close", onClick = onClose)
EditorButton(label = "Save", enabled = state.content.isNotBlank(), onClick = onSave)
EditorButton(label = "Dismiss", onClick = onClose)
}
Text(
text = state.invocation.command,
@@ -107,7 +107,7 @@ fun GitMessageEditorDialog(
modifier = Modifier
.fillMaxWidth()
.weight(1f)
.heightIn(min = 220.dp)
.heightIn(min = 260.dp)
.background(TerminalBackground, RoundedCornerShape(6.dp))
.padding(10.dp)
.horizontalScroll(horizontalScroll)
@@ -117,7 +117,7 @@ fun GitMessageEditorDialog(
value = state.content,
onValueChange = onContentChange,
modifier = Modifier
.sizeIn(minWidth = 1000.dp, minHeight = 700.dp)
.sizeIn(minWidth = 1200.dp, minHeight = 1200.dp)
.focusRequester(contentFocusRequester),
textStyle = TextStyle(
color = TextPrimary,