Fix padding on edit view
This commit is contained in:
parent
75e38a97dd
commit
de9956cbf7
1 changed files with 13 additions and 7 deletions
|
@ -63,16 +63,21 @@ fun MarkdownTextField(
|
||||||
focusedIndicatorColor = Color.Transparent,
|
focusedIndicatorColor = Color.Transparent,
|
||||||
unfocusedIndicatorColor = Color.Transparent
|
unfocusedIndicatorColor = Color.Transparent
|
||||||
)
|
)
|
||||||
val interactionSource = remember { MutableInteractionSource() }
|
val interactionSource = remember { MutableInteractionSource() }
|
||||||
val textStyle = TextStyle.Default.copy(
|
val textStyle = TextStyle.Default.copy(
|
||||||
fontFamily = FontFamily.Monospace,
|
fontFamily = FontFamily.Monospace,
|
||||||
color = MaterialTheme.colorScheme.onSurface
|
color = MaterialTheme.colorScheme.onSurface
|
||||||
)
|
)
|
||||||
|
Column(
|
||||||
|
modifier = modifier
|
||||||
|
.fillMaxSize()
|
||||||
|
.imePadding()
|
||||||
|
.verticalScroll(rememberScrollState())
|
||||||
|
) {
|
||||||
CompositionLocalProvider(LocalTextSelectionColors provides colors.textSelectionColors) {
|
CompositionLocalProvider(LocalTextSelectionColors provides colors.textSelectionColors) {
|
||||||
BasicTextField(
|
BasicTextField(
|
||||||
value = textFieldValue,
|
value = textFieldValue,
|
||||||
modifier = modifier.fillMaxSize()
|
modifier = Modifier.fillMaxSize(),
|
||||||
.imePadding(),
|
|
||||||
onValueChange = setTextFieldAndViewModelValues,
|
onValueChange = setTextFieldAndViewModelValues,
|
||||||
enabled = true,
|
enabled = true,
|
||||||
readOnly = false,
|
readOnly = false,
|
||||||
|
@ -102,6 +107,7 @@ fun MarkdownTextField(
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
private fun String.annotate(enableReadability: Boolean): AnnotatedString {
|
private fun String.annotate(enableReadability: Boolean): AnnotatedString {
|
||||||
|
|
Loading…
Reference in a new issue