Handle reader app bar insets in Compose

This commit is contained in:
arkon
2023-10-25 09:21:04 -04:00
parent 548f7f415a
commit 8057f067b9
3 changed files with 4 additions and 10 deletions

View File

@@ -19,7 +19,7 @@ fun BrightnessOverlay(
.fillMaxSize()
.graphicsLayer {
alpha = abs(value) / 100f
}
},
) {
drawRect(Color.Black)
}

View File

@@ -67,7 +67,7 @@ fun ReaderAppBars(
.surfaceColorAtElevation(3.dp)
.copy(alpha = if (isSystemInDarkTheme()) 0.9f else 0.95f)
val appBarModifier = if (fullscreen) {
val modifierWithInsetsPadding = if (fullscreen) {
Modifier.systemBarsPadding()
} else {
Modifier
@@ -89,7 +89,7 @@ fun ReaderAppBars(
),
) {
AppBar(
modifier = appBarModifier
modifier = modifierWithInsetsPadding
.clickable(onClick = onClickTopAppBar),
backgroundColor = backgroundColor,
title = mangaTitle,
@@ -135,6 +135,7 @@ fun ReaderAppBars(
),
) {
Column(
modifier = modifierWithInsetsPadding,
verticalArrangement = Arrangement.spacedBy(8.dp),
) {
ChapterNavigator(