phone: the same Material You tint as the car screen

This commit is contained in:
Seb3thehacker committed 2026-10-24 14:24:28 -07:00
1 parent 636e40d88a
commit aaa8babd09
1 file changed
+7 -2
@@ -6,11 +6,16 @@ import androidx.compose.material3.dynamicDarkColorScheme
import androidx.compose.material3.dynamicLightColorScheme
import androidx.compose.runtime.Composable
import androidx.compose.ui.platform.LocalContext
import app.seb3thehacker.gearslip.car.theme.withTintedSurfaces
/** Material You: the palette comes from the wallpaper (minSdk 35, so dynamic color always exists). */
/**
* Material You: the palette comes from the wallpaper (minSdk 35, so dynamic color always exists),
* with the same accent tint over the surfaces as the car screen, so the two look like one app.
*/
@Composable
fun GearslipTheme(content: @Composable () -> Unit) {
val context = LocalContext.current
val scheme = if (isSystemInDarkTheme()) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
val dark = isSystemInDarkTheme()
val scheme = (if (dark) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)).withTintedSurfaces(dark)
MaterialTheme(colorScheme = scheme, content = content)
}