Merge pull request #1869 from esensar/feature/custom-themed-surface
Add separate `AppTheme` composable without any surface
This commit is contained in:
commit
543593cc03
1 changed files with 12 additions and 3 deletions
|
@ -14,8 +14,7 @@ import com.simplemobiletools.commons.compose.theme.model.Theme
|
|||
import com.simplemobiletools.commons.compose.theme.model.Theme.Companion.systemDefaultMaterialYou
|
||||
|
||||
@Composable
|
||||
fun AppThemeSurface(
|
||||
modifier: Modifier = Modifier,
|
||||
fun AppTheme(
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
val view = LocalView.current
|
||||
|
@ -37,9 +36,19 @@ fun AppThemeSurface(
|
|||
}
|
||||
TransparentSystemBars()
|
||||
Theme(theme = currentTheme) {
|
||||
content()
|
||||
OnContentDisplayed()
|
||||
}
|
||||
}
|
||||
|
||||
@Composable
|
||||
fun AppThemeSurface(
|
||||
modifier: Modifier = Modifier,
|
||||
content: @Composable () -> Unit,
|
||||
) {
|
||||
AppTheme {
|
||||
Surface(modifier = modifier.fillMaxSize()) {
|
||||
content()
|
||||
OnContentDisplayed()
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue