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:
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user