From 04db01cdbcc904f1f952a7e4c387c8d7ec185fc9 Mon Sep 17 00:00:00 2001 From: ShirkNeko <2773800761@qq.com> Date: Sun, 23 Mar 2025 00:26:58 +0800 Subject: [PATCH] Fix the problem of disappearing background in dark color mode --- .../shirkneko/zako/sukisu/ui/screen/MoreSettings.kt | 4 ++-- .../main/java/shirkneko/zako/sukisu/ui/theme/Theme.kt | 10 ++++++---- 2 files changed, 8 insertions(+), 6 deletions(-) diff --git a/manager/app/src/main/java/shirkneko/zako/sukisu/ui/screen/MoreSettings.kt b/manager/app/src/main/java/shirkneko/zako/sukisu/ui/screen/MoreSettings.kt index d8f0dc65..d66eab85 100644 --- a/manager/app/src/main/java/shirkneko/zako/sukisu/ui/screen/MoreSettings.kt +++ b/manager/app/src/main/java/shirkneko/zako/sukisu/ui/screen/MoreSettings.kt @@ -443,9 +443,9 @@ private fun getSliderColors(cardAlpha: Float, useCustomColors: Boolean = false): // 使用自定义主题色时 useCustomColors -> { SliderDefaults.colors( - activeTrackColor = Color.White, + activeTrackColor = theme.getCustomSliderActiveColor(), inactiveTrackColor = theme.getCustomSliderInactiveColor(), - thumbColor = Color.White + thumbColor = theme.Primary ) } else -> { diff --git a/manager/app/src/main/java/shirkneko/zako/sukisu/ui/theme/Theme.kt b/manager/app/src/main/java/shirkneko/zako/sukisu/ui/theme/Theme.kt index 48eda052..4ef272eb 100644 --- a/manager/app/src/main/java/shirkneko/zako/sukisu/ui/theme/Theme.kt +++ b/manager/app/src/main/java/shirkneko/zako/sukisu/ui/theme/Theme.kt @@ -51,8 +51,10 @@ private fun getDarkColorScheme() = darkColorScheme( onTertiary = Color.White, tertiaryContainer = ThemeConfig.currentTheme.TertiaryContainer.copy(alpha = 0.15f), onTertiaryContainer = Color.White, - onBackground = Color.White, - onSurface = Color.White, + background = Color.Transparent, + surface = Color.Transparent, + onBackground = Color.White.copy(alpha = 0.87f), + onSurface = Color.White.copy(alpha = 0.87f), surfaceVariant = Color(0xFF2F2F2F), onSurfaceVariant = Color.White.copy(alpha = 0.78f), outline = Color.White.copy(alpha = 0.12f), @@ -75,8 +77,8 @@ private fun getLightColorScheme() = lightColorScheme( onTertiaryContainer = ThemeConfig.currentTheme.OnTertiaryContainer, background = Color.Transparent, surface = Color.Transparent, - onBackground = Color.Black, - onSurface = Color.Black, + onBackground = Color.Black.copy(alpha = 0.87f), + onSurface = Color.Black.copy(alpha = 0.87f), surfaceVariant = Color(0xFFF5F5F5), onSurfaceVariant = Color.Black.copy(alpha = 0.78f), outline = Color.Black.copy(alpha = 0.12f),