mirror of
https://github.com/twinksoftware/Gearslip.git
synced 2026-11-12 08:42:25 +01:00
17 lines
732 B
Kotlin
17 lines
732 B
Kotlin
package app.seb3thehacker.gearslip.ui
|
|
|
|
import androidx.compose.foundation.isSystemInDarkTheme
|
|
import androidx.compose.material3.MaterialTheme
|
|
import androidx.compose.material3.dynamicDarkColorScheme
|
|
import androidx.compose.material3.dynamicLightColorScheme
|
|
import androidx.compose.runtime.Composable
|
|
import androidx.compose.ui.platform.LocalContext
|
|
|
|
/** Material You: the palette comes from the wallpaper (minSdk 35, so dynamic color always exists). */
|
|
@Composable
|
|
fun GearslipTheme(content: @Composable () -> Unit) {
|
|
val context = LocalContext.current
|
|
val scheme = if (isSystemInDarkTheme()) dynamicDarkColorScheme(context) else dynamicLightColorScheme(context)
|
|
MaterialTheme(colorScheme = scheme, content = content)
|
|
}
|