From 1631c0b6a57b1958eb8810ed1d7344d8033e5b09 Mon Sep 17 00:00:00 2001 From: Ash Date: Wed, 4 May 2022 03:30:28 +0800 Subject: [PATCH] Add navigationBarsPadding --- app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt | 6 ++++++ .../main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt | 3 +-- .../main/java/me/ash/reader/ui/page/home/flow/FlowPage.kt | 3 +-- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt b/app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt index 75b517a..b4ed1ea 100644 --- a/app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt +++ b/app/src/main/java/me/ash/reader/ui/page/home/FilterBar.kt @@ -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)) diff --git a/app/src/main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt b/app/src/main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt index 336e5a0..538f6bf 100644 --- a/app/src/main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt +++ b/app/src/main/java/me/ash/reader/ui/page/home/feeds/FeedsPage.kt @@ -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, diff --git a/app/src/main/java/me/ash/reader/ui/page/home/flow/FlowPage.kt b/app/src/main/java/me/ash/reader/ui/page/home/flow/FlowPage.kt index 63360ed..af9094c 100644 --- a/app/src/main/java/me/ash/reader/ui/page/home/flow/FlowPage.kt +++ b/app/src/main/java/me/ash/reader/ui/page/home/flow/FlowPage.kt @@ -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,