Restructure clock widget settings

This commit is contained in:
MM20 2023-10-28 23:16:32 +02:00
parent 15ac8912b1
commit 97fca2d014
No known key found for this signature in database
GPG Key ID: 0B61A8F2DEAFA389
2 changed files with 18 additions and 11 deletions

View File

@ -483,15 +483,6 @@ fun ConfigureClockWidgetSheet(
Column(
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(
title = stringResource(R.string.preference_clockwidget_favorites_part),
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(
modifier = Modifier.padding(top = 16.dp),
modifier = Modifier,
) {
Column(
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(
title = stringResource(R.string.preference_clockwidget_music_part),
summary = stringResource(R.string.preference_clockwidget_music_part_summary),

View File

@ -589,9 +589,10 @@
<string name="preference_clock_widget_alignment_top">Top</string>
<string name="preference_clock_widget_alignment_center">Center</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_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_music_part">Media</string>
<string name="preference_clockwidget_music_part_summary">Show media controls when there is an active media session</string>