|
@@ -1,42 +1,19 @@
|
|
|
package com.sirekanian.spacetime.ui.theme
|
|
package com.sirekanian.spacetime.ui.theme
|
|
|
|
|
|
|
|
-import androidx.compose.foundation.isSystemInDarkTheme
|
|
|
|
|
import androidx.compose.material.MaterialTheme
|
|
import androidx.compose.material.MaterialTheme
|
|
|
import androidx.compose.material.darkColors
|
|
import androidx.compose.material.darkColors
|
|
|
-import androidx.compose.material.lightColors
|
|
|
|
|
import androidx.compose.runtime.Composable
|
|
import androidx.compose.runtime.Composable
|
|
|
|
|
|
|
|
-private val DarkColorPalette = darkColors(
|
|
|
|
|
|
|
+private val ColorPalette = darkColors(
|
|
|
primary = Purple200,
|
|
primary = Purple200,
|
|
|
primaryVariant = Purple700,
|
|
primaryVariant = Purple700,
|
|
|
secondary = Teal200
|
|
secondary = Teal200
|
|
|
)
|
|
)
|
|
|
|
|
|
|
|
-private val LightColorPalette = lightColors(
|
|
|
|
|
- primary = Purple500,
|
|
|
|
|
- primaryVariant = Purple700,
|
|
|
|
|
- secondary = Teal200
|
|
|
|
|
-
|
|
|
|
|
- /* Other default colors to override
|
|
|
|
|
- background = Color.White,
|
|
|
|
|
- surface = Color.White,
|
|
|
|
|
- onPrimary = Color.White,
|
|
|
|
|
- onSecondary = Color.Black,
|
|
|
|
|
- onBackground = Color.Black,
|
|
|
|
|
- onSurface = Color.Black,
|
|
|
|
|
- */
|
|
|
|
|
-)
|
|
|
|
|
-
|
|
|
|
|
@Composable
|
|
@Composable
|
|
|
-fun SpacetimeTheme(darkTheme: Boolean = isSystemInDarkTheme(), content: @Composable () -> Unit) {
|
|
|
|
|
- val colors = if (darkTheme) {
|
|
|
|
|
- DarkColorPalette
|
|
|
|
|
- } else {
|
|
|
|
|
- LightColorPalette
|
|
|
|
|
- }
|
|
|
|
|
-
|
|
|
|
|
|
|
+fun SpacetimeTheme(content: @Composable () -> Unit) {
|
|
|
MaterialTheme(
|
|
MaterialTheme(
|
|
|
- colors = colors,
|
|
|
|
|
|
|
+ colors = ColorPalette,
|
|
|
typography = Typography,
|
|
typography = Typography,
|
|
|
shapes = Shapes,
|
|
shapes = Shapes,
|
|
|
content = content
|
|
content = content
|