diff --git a/compose/src/main/java/com/shifthackz/catppuccin/compose/CatppuccinTheme.kt b/compose/src/main/java/com/shifthackz/catppuccin/compose/CatppuccinTheme.kt index 051c898..39dda28 100644 --- a/compose/src/main/java/com/shifthackz/catppuccin/compose/CatppuccinTheme.kt +++ b/compose/src/main/java/com/shifthackz/catppuccin/compose/CatppuccinTheme.kt @@ -11,6 +11,7 @@ import androidx.compose.material3.Shapes import androidx.compose.material3.Typography import androidx.compose.runtime.Composable import androidx.compose.runtime.SideEffect +import androidx.compose.ui.graphics.Color import androidx.compose.ui.graphics.toArgb import androidx.compose.ui.platform.LocalView import androidx.core.graphics.luminance @@ -90,6 +91,7 @@ object CatppuccinTheme { * @param colorScheme A complete definition of the Material Color theme for this hierarchy. * @param typography A set of text styles to be used as this hierarchy's typography system. * @param shapes A set of corner shapes to be used as this hierarchy's shape system. + * @param statusBarColor A color to paint status bar with, by default uses surface theme color. * @param isAppearanceLightStatusBars If true, changes the foreground color of the status bars * to light so that the items on the bar can be read clearly. * @param content Child composable UI to theme. @@ -102,6 +104,7 @@ object CatppuccinTheme { colorScheme: ColorScheme = Catppuccin.Latte.colorScheme(), typography: Typography = Catppuccin.Latte.typography(), shapes: Shapes = MaterialTheme.shapes, + statusBarColor: Color = colorScheme.surface, isAppearanceLightStatusBars: Boolean, content: @Composable () -> Unit, ) { @@ -109,8 +112,7 @@ object CatppuccinTheme { if (!view.isInEditMode) { SideEffect { val window = (view.context as Activity).window - val statusBarColor = colorScheme.surface.toArgb() - window.statusBarColor = statusBarColor + window.statusBarColor = statusBarColor.toArgb() WindowCompat .getInsetsController(window, view) .isAppearanceLightStatusBars = isAppearanceLightStatusBars diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index 5198365..bea25e7 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -1,5 +1,5 @@ [versions] -catppuccin = "0.1.1" +catppuccin = "0.1.2" activityCompose = "1.8.2" androidGradlePlugin = "8.2.0" kotlin = "1.9.10"