fix: Add some spacing

This commit is contained in:
Myzel394 2023-12-15 22:17:15 +01:00
parent 101f8d46e9
commit 3aa4caf9ed
No known key found for this signature in database
GPG Key ID: 79CC92F37B3E1A2B

View File

@ -66,6 +66,36 @@ fun StartRecording(
) {
val context = LocalContext.current
val label = stringResource(
R.string.ui_audioRecorder_action_start_description_2,
appSettings.maxDuration / 1000 / 60
)
val annotatedDescription = buildAnnotatedString {
append(stringResource(R.string.ui_audioRecorder_action_start_description_1))
withStyle(SpanStyle(background = MaterialTheme.colorScheme.surfaceVariant)) {
pushStringAnnotation(
tag = "minutes",
annotation = label,
)
append(label)
}
append(stringResource(R.string.ui_audioRecorder_action_start_description_3))
}
var showQuickMaxDurationSelector by rememberSaveable {
mutableStateOf(false)
}
if (showQuickMaxDurationSelector) {
QuickMaxDurationSelector(
onDismiss = {
showQuickMaxDurationSelector = false
},
)
}
Column(
modifier = Modifier
.fillMaxSize()
@ -129,38 +159,11 @@ fun StartRecording(
contentDescription = null,
colorFilter = ColorFilter.tint(MaterialTheme.colorScheme.onSurfaceVariant),
modifier = Modifier
.size(24.dp)
.size(ButtonDefaults.IconSize)
)
val label = stringResource(
R.string.ui_audioRecorder_action_start_description_2,
appSettings.maxDuration / 1000 / 60
)
val annotatedDescription = buildAnnotatedString {
append(stringResource(R.string.ui_audioRecorder_action_start_description_1))
Spacer(modifier = Modifier.width(ButtonDefaults.IconSpacing))
withStyle(SpanStyle(background = MaterialTheme.colorScheme.surfaceVariant)) {
pushStringAnnotation(
tag = "minutes",
annotation = label,
)
append(label)
}
append(stringResource(R.string.ui_audioRecorder_action_start_description_3))
}
var showQuickMaxDurationSelector by rememberSaveable {
mutableStateOf(false)
}
if (showQuickMaxDurationSelector) {
QuickMaxDurationSelector(
onDismiss = {
showQuickMaxDurationSelector = false
},
)
}
ClickableText(
text = annotatedDescription,
onClick = { textIndex ->