From d689f088d081901cef921a861ea16cbaa636b865 Mon Sep 17 00:00:00 2001 From: takahirom Date: Tue, 6 Aug 2024 10:13:02 +0900 Subject: [PATCH] Fix theme --- .../java/io/github/droidkaigi/confsched/MainActivity.kt | 3 +++ app-android/src/main/res/values/themes.xml | 4 ++-- .../droidkaigi/confsched/designsystem/theme/Theme.kt | 8 -------- 3 files changed, 5 insertions(+), 10 deletions(-) diff --git a/app-android/src/main/java/io/github/droidkaigi/confsched/MainActivity.kt b/app-android/src/main/java/io/github/droidkaigi/confsched/MainActivity.kt index 7f945b4d5..903551169 100644 --- a/app-android/src/main/java/io/github/droidkaigi/confsched/MainActivity.kt +++ b/app-android/src/main/java/io/github/droidkaigi/confsched/MainActivity.kt @@ -16,6 +16,7 @@ import androidx.compose.runtime.produceState import androidx.compose.runtime.remember import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toArgb +import androidx.core.view.WindowCompat import androidx.window.layout.DisplayFeature import androidx.window.layout.WindowInfoTracker import dagger.hilt.android.AndroidEntryPoint @@ -61,6 +62,8 @@ class MainActivity : ComponentActivity() { } } + WindowCompat.getInsetsController(window, window.decorView) + .isAppearanceLightStatusBars = false setContent { val windowSize = calculateWindowSizeClass() val displayFeatures = calculateDisplayFeatures(this) diff --git a/app-android/src/main/res/values/themes.xml b/app-android/src/main/res/values/themes.xml index 9164df707..7f61d29ae 100644 --- a/app-android/src/main/res/values/themes.xml +++ b/app-android/src/main/res/values/themes.xml @@ -1,7 +1,7 @@ - - \ No newline at end of file + diff --git a/core/designsystem/src/commonMain/kotlin/io/github/droidkaigi/confsched/designsystem/theme/Theme.kt b/core/designsystem/src/commonMain/kotlin/io/github/droidkaigi/confsched/designsystem/theme/Theme.kt index f035ad5fd..ca9f0ad95 100644 --- a/core/designsystem/src/commonMain/kotlin/io/github/droidkaigi/confsched/designsystem/theme/Theme.kt +++ b/core/designsystem/src/commonMain/kotlin/io/github/droidkaigi/confsched/designsystem/theme/Theme.kt @@ -241,14 +241,6 @@ fun KaigiTheme( @Composable () -> Unit, ) { val colorScheme = darkScheme -// val view = LocalView.current -// if (!view.isInEditMode) { -// SideEffect { -// val window = (view.context as Activity).window -// window.statusBarColor = colorScheme.primary.toArgb() -// WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = darkTheme -// } -// } MaterialTheme( colorScheme = colorScheme,