[skip ci]: Move the language selection into the card
This commit is contained in:
@@ -541,35 +541,6 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
|
|||||||
onToggle = { isAppearanceExpanded = !isAppearanceExpanded }
|
onToggle = { isAppearanceExpanded = !isAppearanceExpanded }
|
||||||
)
|
)
|
||||||
|
|
||||||
AnimatedVisibility(
|
|
||||||
visible = isAppearanceExpanded,
|
|
||||||
enter = fadeIn() + expandVertically(),
|
|
||||||
exit = fadeOut() + shrinkVertically()
|
|
||||||
) {
|
|
||||||
ListItem(
|
|
||||||
headlineContent = { Text(stringResource(R.string.language_setting)) },
|
|
||||||
supportingContent = {
|
|
||||||
Text(supportedLanguages.find { it.first == currentLanguage }?.second
|
|
||||||
?: stringResource(R.string.language_follow_system))
|
|
||||||
},
|
|
||||||
leadingContent = {
|
|
||||||
Icon(
|
|
||||||
Icons.Default.Language,
|
|
||||||
contentDescription = null,
|
|
||||||
tint = MaterialTheme.colorScheme.primary
|
|
||||||
)
|
|
||||||
},
|
|
||||||
trailingContent = {
|
|
||||||
Icon(
|
|
||||||
Icons.AutoMirrored.Filled.NavigateNext,
|
|
||||||
contentDescription = null,
|
|
||||||
tint = MaterialTheme.colorScheme.onSurfaceVariant
|
|
||||||
)
|
|
||||||
},
|
|
||||||
modifier = Modifier.clickable { showLanguageDialog = true }
|
|
||||||
)
|
|
||||||
}
|
|
||||||
|
|
||||||
AnimatedVisibility(
|
AnimatedVisibility(
|
||||||
visible = isAppearanceExpanded,
|
visible = isAppearanceExpanded,
|
||||||
enter = fadeIn() + expandVertically(),
|
enter = fadeIn() + expandVertically(),
|
||||||
@@ -581,6 +552,38 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
|
|||||||
modifier = Modifier.padding(bottom = 16.dp)
|
modifier = Modifier.padding(bottom = 16.dp)
|
||||||
) {
|
) {
|
||||||
Column {
|
Column {
|
||||||
|
// 语言设置
|
||||||
|
ListItem(
|
||||||
|
headlineContent = { Text(stringResource(R.string.language_setting)) },
|
||||||
|
supportingContent = {
|
||||||
|
Text(supportedLanguages.find { it.first == currentLanguage }?.second
|
||||||
|
?: stringResource(R.string.language_follow_system))
|
||||||
|
},
|
||||||
|
leadingContent = {
|
||||||
|
Icon(
|
||||||
|
Icons.Default.Language,
|
||||||
|
contentDescription = null,
|
||||||
|
tint = MaterialTheme.colorScheme.primary
|
||||||
|
)
|
||||||
|
},
|
||||||
|
trailingContent = {
|
||||||
|
Icon(
|
||||||
|
Icons.AutoMirrored.Filled.NavigateNext,
|
||||||
|
contentDescription = null,
|
||||||
|
tint = MaterialTheme.colorScheme.onSurfaceVariant
|
||||||
|
)
|
||||||
|
},
|
||||||
|
colors = ListItemDefaults.colors(
|
||||||
|
containerColor = Color.Transparent
|
||||||
|
),
|
||||||
|
modifier = Modifier.clickable { showLanguageDialog = true }
|
||||||
|
)
|
||||||
|
|
||||||
|
HorizontalDivider(
|
||||||
|
modifier = Modifier.padding(horizontal = 16.dp),
|
||||||
|
color = MaterialTheme.colorScheme.outlineVariant
|
||||||
|
)
|
||||||
|
|
||||||
// 主题模式
|
// 主题模式
|
||||||
ListItem(
|
ListItem(
|
||||||
headlineContent = { Text(stringResource(R.string.theme_mode)) },
|
headlineContent = { Text(stringResource(R.string.theme_mode)) },
|
||||||
|
|||||||
Reference in New Issue
Block a user