Opt the transparency slider display logic with AnimatedVisibility and update the formatting in the Chinese string resource.

Signed-off-by: ShirkNeko <109797057+ShirkNeko@users.noreply.github.com>
This commit is contained in:
ShirkNeko
2025-04-04 17:51:27 +08:00
parent 5ccec93940
commit c36f8b0df3
2 changed files with 41 additions and 35 deletions

View File

@@ -407,9 +407,11 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
)
}
)
if (ThemeConfig.customBackgroundUri != null && showCardSettings) {
// 透明度 Slider
AnimatedVisibility(
visible = ThemeConfig.customBackgroundUri != null && showCardSettings,
modifier = Modifier.fillMaxWidth().padding(horizontal = 24.dp)
) {
ListItem(
leadingContent = { Icon(Icons.Filled.Opacity, null) },
headlineContent = { Text(stringResource(R.string.settings_card_alpha)) },
@@ -439,7 +441,11 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
)
}
)
}
AnimatedVisibility(
visible = ThemeConfig.customBackgroundUri != null && showCardSettings,
modifier = Modifier.fillMaxWidth().padding(horizontal = 24.dp)
){
ListItem(
leadingContent = { Icon(Icons.Filled.DarkMode, null) },
headlineContent = { Text(stringResource(R.string.theme_mode)) },
@@ -448,7 +454,7 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
showThemeModeDialog = true
}
)
}
// 主题模式选择对话框
if (showThemeModeDialog) {
@@ -511,7 +517,7 @@ fun MoreSettingsScreen(navigator: DestinationsNavigator) {
}
}
}
}
@Composable
private fun getSliderColors(cardAlpha: Float, useCustomColors: Boolean = false): SliderColors {