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