Restructure clock widget settings

This commit is contained in:
MM20
2023-10-28 23:17:05 +02:00
parent 15ac8912b1
commit 97fca2d014
2 changed files with 18 additions and 11 deletions
@@ -483,15 +483,6 @@ fun ConfigureClockWidgetSheet(
Column( Column(
modifier = Modifier.fillMaxWidth() modifier = Modifier.fillMaxWidth()
) { ) {
SwitchPreference(
title = stringResource(R.string.preference_clockwidget_date_part),
summary = stringResource(R.string.preference_clockwidget_date_part_summary),
icon = Icons.Rounded.Today,
value = date == true,
onValueChanged = {
viewModel.setDatePart(it)
}
)
SwitchPreference( SwitchPreference(
title = stringResource(R.string.preference_clockwidget_favorites_part), title = stringResource(R.string.preference_clockwidget_favorites_part),
summary = stringResource(R.string.preference_clockwidget_favorites_part_summary), summary = stringResource(R.string.preference_clockwidget_favorites_part_summary),
@@ -503,12 +494,27 @@ fun ConfigureClockWidgetSheet(
) )
} }
} }
Text(
modifier = Modifier.padding(top = 16.dp, bottom = 8.dp),
style = MaterialTheme.typography.titleSmall,
color = MaterialTheme.colorScheme.secondary,
text = stringResource(R.string.preference_clockwidget_dynamic_zone)
)
OutlinedCard( OutlinedCard(
modifier = Modifier.padding(top = 16.dp), modifier = Modifier,
) { ) {
Column( Column(
modifier = Modifier.fillMaxWidth() modifier = Modifier.fillMaxWidth()
) { ) {
SwitchPreference(
title = stringResource(R.string.preference_clockwidget_date_part),
summary = stringResource(R.string.preference_clockwidget_date_part_summary),
icon = Icons.Rounded.Today,
value = date == true,
onValueChanged = {
viewModel.setDatePart(it)
}
)
SwitchPreference( SwitchPreference(
title = stringResource(R.string.preference_clockwidget_music_part), title = stringResource(R.string.preference_clockwidget_music_part),
summary = stringResource(R.string.preference_clockwidget_music_part_summary), summary = stringResource(R.string.preference_clockwidget_music_part_summary),
+2 -1
View File
@@ -589,9 +589,10 @@
<string name="preference_clock_widget_alignment_top">Top</string> <string name="preference_clock_widget_alignment_top">Top</string>
<string name="preference_clock_widget_alignment_center">Center</string> <string name="preference_clock_widget_alignment_center">Center</string>
<string name="preference_clock_widget_alignment_bottom">Bottom</string> <string name="preference_clock_widget_alignment_bottom">Bottom</string>
<string name="preference_clockwidget_dynamic_zone">Dynamic zone</string>
<string name="preference_clockwidget_date_part">Date</string> <string name="preference_clockwidget_date_part">Date</string>
<string name="preference_clockwidget_date_part_summary">Show the current date</string> <string name="preference_clockwidget_date_part_summary">Show the current date</string>
<string name="preference_clockwidget_favorites_part">Favorites</string> <string name="preference_clockwidget_favorites_part">Dock</string>
<string name="preference_clockwidget_favorites_part_summary">Show the first row of pinned items</string> <string name="preference_clockwidget_favorites_part_summary">Show the first row of pinned items</string>
<string name="preference_clockwidget_music_part">Media</string> <string name="preference_clockwidget_music_part">Media</string>
<string name="preference_clockwidget_music_part_summary">Show media controls when there is an active media session</string> <string name="preference_clockwidget_music_part_summary">Show media controls when there is an active media session</string>