TrainerSnow / oneui-compose

Enables Jetpack Compose developers the ability to incorporate Samsung's OneUI design-system into their applications, to match the visuals of prebuilt Samsung apps.
Apache License 2.0
27 stars 3 forks source link

Set status bar color to seslRoundAndBgcolor #70

Open abdullateefsherani07 opened 2 weeks ago

abdullateefsherani07 commented 2 weeks ago

We use seslRoundAndBgcolor as main background color of app. So it would be good idea if you add code in OneUITheme.kt that set status bar color to seslRoundAndBgcolor or make OneUITheme composable take status bar color as parameter. You can use following code in OneUITheme composable

val darkTheme = isSystemInDarkTheme() val view = LocalView.current if (!view.isInEditMode) { SideEffect { val window = (view.context as Activity).window window.statusBarColor = colorTheme.seslRoundAndBgcolor.toArgb() WindowCompat.getInsetsController(window, view).isAppearanceLightStatusBars = !darkTheme } }

Waiting for your response.

TrainerSnow commented 2 weeks ago

Hi, i agree that is a good idea, its a similar configuration i have used on my apps using this library. Unfortunately, my time currently is limited. If you are willing to, i would appreciate you opening a pull request with those changes.