diff --git a/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt b/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt index 66b58cff..699b26ac 100644 --- a/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt +++ b/presentation/src/main/java/com/nexters/boolti/presentation/theme/Theme.kt @@ -1,9 +1,15 @@ package com.nexters.boolti.presentation.theme +import android.app.Activity import androidx.compose.material3.MaterialTheme import androidx.compose.material3.darkColorScheme import androidx.compose.material3.lightColorScheme import androidx.compose.runtime.Composable +import androidx.compose.runtime.SideEffect +import androidx.compose.ui.graphics.toArgb +import androidx.compose.ui.platform.LocalView +import androidx.core.view.ViewCompat +import androidx.core.view.WindowCompat private val DarkColorScheme = darkColorScheme( primary = Orange01, @@ -19,39 +25,22 @@ private val DarkColorScheme = darkColorScheme( onSurfaceVariant = Grey15, outline = Grey80, outlineVariant = Grey10, - -// secondary = PurpleGrey80, -// tertiary = Pink80 -) - -private val LightColorScheme = lightColorScheme( -// primary = Purple40, -// secondary = PurpleGrey40, -// tertiary = Pink40 - - /* Other default colors to override - background = Color(0xFFFFFBFE), - surface = Color(0xFFFFFBFE), - onPrimary = Color.White, - onSecondary = Color.White, - onTertiary = Color.White, - onBackground = Color(0xFF1C1B1F), - onSurface = Color(0xFF1C1B1F), - */ ) @Composable fun BooltiTheme( - darkTheme: Boolean = true, // FIXME light theme이 추가된다면 이 부분을 isSystemInDarkTheme()로 수정하세요. content: @Composable () -> Unit ) { - val colorScheme = when { - darkTheme -> DarkColorScheme - else -> LightColorScheme + val view = LocalView.current + if (!view.isInEditMode) { + SideEffect { + val window = (view.context as Activity).window + WindowCompat.getInsetsController(window, view).isAppearanceLightNavigationBars = false + } } MaterialTheme( - colorScheme = colorScheme, + colorScheme = DarkColorScheme, typography = Typography, content = content )