Dsign for editing section in composer and increase click area for the close button.

This commit is contained in:
Benoit Marty 2023-06-29 11:47:24 +02:00 committed by Benoit Marty
parent 0e9a4bd860
commit 6669c6a3c5

View file

@ -213,29 +213,35 @@ private fun EditingModeView(
modifier: Modifier = Modifier, modifier: Modifier = Modifier,
) { ) {
Row( Row(
horizontalArrangement = Arrangement.spacedBy(6.dp), horizontalArrangement = Arrangement.spacedBy(5.dp),
verticalAlignment = Alignment.CenterVertically,
modifier = modifier modifier = modifier
.fillMaxWidth() .fillMaxWidth()
.padding(horizontal = 12.dp, vertical = 8.dp) .padding(start = 12.dp)
) { ) {
Icon( Icon(
resourceId = VectorIcons.Edit, resourceId = VectorIcons.Edit,
contentDescription = stringResource(CommonStrings.common_editing), contentDescription = stringResource(CommonStrings.common_editing),
tint = MaterialTheme.colorScheme.secondary, tint = ElementTheme.materialColors.secondary,
modifier = Modifier.size(16.dp), modifier = Modifier
.padding(vertical = 8.dp)
.size(16.dp),
) )
Text( Text(
stringResource(CommonStrings.common_editing), stringResource(CommonStrings.common_editing),
style = ElementTextStyles.Regular.caption2, style = ElementTheme.typography.fontBodySmRegular,
textAlign = TextAlign.Start, textAlign = TextAlign.Start,
color = MaterialTheme.colorScheme.secondary, color = ElementTheme.materialColors.secondary,
modifier = Modifier.weight(1f) modifier = Modifier
.padding(vertical = 8.dp)
.weight(1f)
) )
Icon( Icon(
imageVector = Icons.Default.Close, imageVector = Icons.Default.Close,
contentDescription = stringResource(CommonStrings.action_close), contentDescription = stringResource(CommonStrings.action_close),
tint = MaterialTheme.colorScheme.secondary, tint = ElementTheme.materialColors.secondary,
modifier = Modifier modifier = Modifier
.padding(top = 8.dp, bottom = 8.dp, start = 16.dp, end = 12.dp)
.size(16.dp) .size(16.dp)
.clickable( .clickable(
enabled = true, enabled = true,
@ -243,8 +249,7 @@ private fun EditingModeView(
interactionSource = MutableInteractionSource(), interactionSource = MutableInteractionSource(),
indication = rememberRipple(bounded = false) indication = rememberRipple(bounded = false)
), ),
)
)
} }
} }