Add navigationBarsPadding

This commit is contained in:
Ash 2022-05-04 03:30:28 +08:00
parent c1a4c8ec5b
commit 1631c0b6a5
3 changed files with 8 additions and 4 deletions

View File

@ -1,7 +1,9 @@
package me.ash.reader.ui.page.home
import android.view.SoundEffectConstants
import androidx.compose.foundation.background
import androidx.compose.foundation.layout.Spacer
import androidx.compose.foundation.layout.navigationBarsPadding
import androidx.compose.foundation.layout.width
import androidx.compose.material3.*
import androidx.compose.runtime.Composable
@ -12,6 +14,7 @@ import com.google.accompanist.pager.ExperimentalPagerApi
import me.ash.reader.data.entity.Filter
import me.ash.reader.data.preference.FlowFilterBarStylePreference
import me.ash.reader.ui.ext.getName
import me.ash.reader.ui.ext.surfaceColorAtElevation
import me.ash.reader.ui.theme.palette.onDark
@OptIn(ExperimentalPagerApi::class)
@ -28,6 +31,9 @@ fun FilterBar(
val view = LocalView.current
NavigationBar(
modifier = Modifier
.background(MaterialTheme.colorScheme.surfaceColorAtElevation(filterBarTonalElevation))
.navigationBarsPadding(),
tonalElevation = filterBarTonalElevation,
) {
Spacer(modifier = Modifier.width(filterBarPadding))

View File

@ -128,8 +128,7 @@ fun FeedsPage(
Scaffold(
modifier = Modifier
.background(MaterialTheme.colorScheme.surfaceColorAtElevation(topBarTonalElevation.value.dp))
.statusBarsPadding()
.navigationBarsPadding(),
.statusBarsPadding(),
containerColor = MaterialTheme.colorScheme.surfaceColorAtElevation(
groupListTonalElevation.value.dp
) onDark MaterialTheme.colorScheme.surface,

View File

@ -109,8 +109,7 @@ fun FlowPage(
Scaffold(
modifier = Modifier
.background(MaterialTheme.colorScheme.surfaceColorAtElevation(topBarTonalElevation.value.dp))
.statusBarsPadding()
.navigationBarsPadding(),
.statusBarsPadding(),
containerColor = MaterialTheme.colorScheme.surfaceColorAtElevation(
articleListTonalElevation.value.dp
) onDark MaterialTheme.colorScheme.surface,