update color scheme
This commit is contained in:
@@ -17,7 +17,6 @@ import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.compose.ui.window.DialogProperties
|
||||
import ru.shadowsparky.ui.theme.getColorScheme
|
||||
import ru.shadowsparky.ui.util.isWear
|
||||
|
||||
@OptIn(ExperimentalMaterial3Api::class, ExperimentalMaterial3ExpressiveApi::class)
|
||||
@Composable
|
||||
@@ -45,7 +44,7 @@ fun AlertContent(
|
||||
}
|
||||
}
|
||||
MaterialExpressiveTheme(getColorScheme()) {
|
||||
if (isTv() || isWear()) {
|
||||
if (isTv()) {
|
||||
BasicAlertDialog(
|
||||
onDismissRequest = onDismissRequest,
|
||||
modifier = modifier,
|
||||
|
||||
@@ -6,6 +6,7 @@ import androidx.compose.material3.darkColorScheme
|
||||
import androidx.compose.material3.lightColorScheme
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.compositionLocalOf
|
||||
import ru.shadowsparky.ui.util.isWear
|
||||
|
||||
val lightScheme = lightColorScheme(
|
||||
primary = primaryLight,
|
||||
@@ -88,7 +89,7 @@ val LocalColorSchemeProvider = compositionLocalOf<ColorScheme?> { null }
|
||||
@Composable
|
||||
fun getColorScheme(): ColorScheme {
|
||||
return LocalColorSchemeProvider.current ?: when {
|
||||
isSystemInDarkTheme() -> darkDynamicScheme() ?: darkScheme
|
||||
isSystemInDarkTheme() || isWear() -> darkDynamicScheme() ?: darkScheme
|
||||
else -> lightDynamicScheme() ?: lightScheme
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user