Uniformly use surfaceContainerHigh as the background color of the popup window

This commit is contained in:
ShirkNeko
2025-06-21 16:34:38 +08:00
parent b7b995bf73
commit 74ec20745c
3 changed files with 108 additions and 106 deletions

View File

@@ -209,11 +209,10 @@ fun GroupsPanel(selected: List<Groups>, closeSelection: (selection: Set<Groups>)
}
val selection = HashSet(selected)
val backgroundColor = if (CardConfig.isCustomBackgroundEnabled) Color.Transparent else MaterialTheme.colorScheme.surfaceContainerHigh
MaterialTheme(
colorScheme = MaterialTheme.colorScheme.copy(
surface = backgroundColor
surface = MaterialTheme.colorScheme.surfaceContainerHigh
)
) {
ListDialog(
@@ -289,11 +288,10 @@ fun CapsPanel(
}
val selection = HashSet(selected)
val backgroundColor = if (CardConfig.isCustomBackgroundEnabled) Color.Transparent else MaterialTheme.colorScheme.surfaceContainerHigh
MaterialTheme(
colorScheme = MaterialTheme.colorScheme.copy(
surface = backgroundColor
surface = MaterialTheme.colorScheme.surfaceContainerHigh
)
) {
ListDialog(
@@ -444,11 +442,10 @@ private fun SELinuxPanel(
)
)
val backgroundColor = if (CardConfig.isCustomBackgroundEnabled) Color.Transparent else MaterialTheme.colorScheme.surfaceContainerHigh
MaterialTheme(
colorScheme = MaterialTheme.colorScheme.copy(
surface = backgroundColor
surface = MaterialTheme.colorScheme.surfaceContainerHigh
)
) {
InputDialog(

View File

@@ -688,11 +688,10 @@ fun rememberSelectKmiDialog(onSelected: (String?) -> Unit): DialogHandle {
}
var selection by remember { mutableStateOf<String?>(null) }
val backgroundColor = MaterialTheme.colorScheme.surfaceContainerHigh
MaterialTheme(
colorScheme = MaterialTheme.colorScheme.copy(
surface = backgroundColor
surface = MaterialTheme.colorScheme.surfaceContainerHigh
)
) {
ListDialog(state = rememberUseCaseState(visible = true, onFinishedRequest = {

View File

@@ -662,6 +662,11 @@ fun rememberUninstallDialog(onSelected: (UninstallType) -> Unit): DialogHandle {
var selectedOption by remember { mutableStateOf<UninstallType?>(null) }
MaterialTheme(
colorScheme = MaterialTheme.colorScheme.copy(
surface = MaterialTheme.colorScheme.surfaceContainerHigh
)
) {
AlertDialog(
onDismissRequest = {
dismiss()
@@ -773,6 +778,7 @@ fun rememberUninstallDialog(onSelected: (UninstallType) -> Unit): DialogHandle {
)
}
}
}
@OptIn(ExperimentalMaterial3Api::class)
@Composable