From 52514ba35bae401807a4a41c1f4629727c5a0d65 Mon Sep 17 00:00:00 2001 From: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com> Date: Thu, 15 May 2025 16:40:27 +0800 Subject: [PATCH] [skip ci]: Move the language selection into the card --- .../sukisu/ultra/ui/screen/MoreSettings.kt | 61 ++++++++++--------- 1 file changed, 32 insertions(+), 29 deletions(-) diff --git a/manager/app/src/main/java/com/sukisu/ultra/ui/screen/MoreSettings.kt b/manager/app/src/main/java/com/sukisu/ultra/ui/screen/MoreSettings.kt index 4274c51d..25825e96 100644 --- a/manager/app/src/main/java/com/sukisu/ultra/ui/screen/MoreSettings.kt +++ b/manager/app/src/main/java/com/sukisu/ultra/ui/screen/MoreSettings.kt @@ -541,35 +541,6 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) { 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( visible = isAppearanceExpanded, enter = fadeIn() + expandVertically(), @@ -581,6 +552,38 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) { modifier = Modifier.padding(bottom = 16.dp) ) { 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( headlineContent = { Text(stringResource(R.string.theme_mode)) },