From 1a83dedff9cc1d6e6f2ffc83f97dfaf3ca0798c4 Mon Sep 17 00:00:00 2001 From: Jean-Luc Makiola Date: Fri, 20 Nov 2026 12:28:38 +0100 Subject: [PATCH] Use GroupedSectionHeader in the recurrence picker (#79) --- .../agendula/ui/edit/RecurrencePicker.kt | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/RecurrencePicker.kt b/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/RecurrencePicker.kt index d6345ba..529655b 100644 --- a/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/RecurrencePicker.kt +++ b/app/src/main/java/de/jeanlucmakiola/agendula/ui/edit/RecurrencePicker.kt @@ -42,6 +42,7 @@ import de.jeanlucmakiola.agendula.ui.common.recurrenceText import de.jeanlucmakiola.floret.components.DialogAmountField import de.jeanlucmakiola.floret.components.FullScreenPicker import de.jeanlucmakiola.floret.components.GroupedRow +import de.jeanlucmakiola.floret.components.GroupedSectionHeader import de.jeanlucmakiola.floret.components.GroupedSurface import de.jeanlucmakiola.floret.components.Position import de.jeanlucmakiola.floret.components.SelectedCheck @@ -268,8 +269,8 @@ fun RecurrencePicker( } } - Column(modifier = Modifier.padding(top = 16.dp)) { - SectionLabel(stringResource(R.string.recurrence_ends)) + Column { + GroupedSectionHeader(stringResource(R.string.recurrence_ends)) CheckRow( title = stringResource(R.string.recurrence_end_never), position = Position.Top, @@ -374,21 +375,11 @@ private fun PresetList( ) } -@Composable -private fun SectionLabel(text: String) { - Text( - text = text, - style = MaterialTheme.typography.labelLarge, - color = MaterialTheme.colorScheme.onSurfaceVariant, - modifier = Modifier.padding(start = 16.dp, bottom = 8.dp), - ) -} - /** Whether the next occurrence keeps to the schedule or counts from completion. */ @Composable private fun RepeatFromSection(fromCompletion: Boolean, onChange: (Boolean) -> Unit) { - Column(modifier = Modifier.padding(top = 16.dp)) { - SectionLabel(stringResource(R.string.recurrence_repeat_from)) + Column { + GroupedSectionHeader(stringResource(R.string.recurrence_repeat_from)) CheckRow( title = stringResource(R.string.recurrence_from_due), summary = stringResource(R.string.recurrence_from_due_summary),