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" applicationId = "solutions.tretter.githugandroid"
minSdk = 26 minSdk = 26
targetSdk = 35 targetSdk = 35
versionCode = 168 versionCode = 169
versionName = "0.1.167" versionName = "0.1.168"
testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner" testInstrumentationRunner = "androidx.test.runner.AndroidJUnitRunner"
vectorDrawables.useSupportLibrary = true vectorDrawables.useSupportLibrary = true

View File

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