Manager: Fix the problem that the contrast of key color is too light

This commit is contained in:
ShirkNeko
2025-03-31 14:33:23 +08:00
parent 7f0ae95dfb
commit cb116286ed
2 changed files with 11 additions and 2 deletions

View File

@@ -346,7 +346,11 @@ fun ModuleScreen(navigator: DestinationsNavigator) {
floatingActionButton = {
if (!hideInstallButton) {
val moduleInstall = stringResource(id = R.string.module_install)
val cardColor = MaterialTheme.colorScheme.secondaryContainer
val cardColor = if (!ThemeConfig.useDynamicColor) {
ThemeConfig.currentTheme.ButtonContrast
} else {
MaterialTheme.colorScheme.secondaryContainer
}
ExtendedFloatingActionButton(
onClick = {
selectZipLauncher.launch(

View File

@@ -60,6 +60,7 @@ import com.ramcosta.composedestinations.result.getOr
import kotlinx.coroutines.Dispatchers
import kotlinx.coroutines.launch
import shirkneko.zako.sukisu.R
import shirkneko.zako.sukisu.ui.theme.ThemeConfig
import shirkneko.zako.sukisu.ui.viewmodel.TemplateViewModel
/**
@@ -77,7 +78,11 @@ fun AppProfileTemplateScreen(
val viewModel = viewModel<TemplateViewModel>()
val scope = rememberCoroutineScope()
val scrollBehavior = TopAppBarDefaults.pinnedScrollBehavior(rememberTopAppBarState())
val cardColor = MaterialTheme.colorScheme.secondaryContainer
val cardColor = if (!ThemeConfig.useDynamicColor) {
ThemeConfig.currentTheme.ButtonContrast
} else {
MaterialTheme.colorScheme.secondaryContainer
}
LaunchedEffect(Unit) {
if (viewModel.templateList.isEmpty()) {