diff --git a/app/src/main/java/com/InfernalAquatics/deepwave/ui/components/BottomNavBar.kt b/app/src/main/java/com/InfernalAquatics/deepwave/ui/components/BottomNavBar.kt index e276002..dbd3e80 100644 --- a/app/src/main/java/com/InfernalAquatics/deepwave/ui/components/BottomNavBar.kt +++ b/app/src/main/java/com/InfernalAquatics/deepwave/ui/components/BottomNavBar.kt @@ -1,6 +1,7 @@ package com.InfernalAquatics.deepwave.ui.components import android.content.res.Configuration +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.material.icons.Icons import androidx.compose.material.icons.filled.Home import androidx.compose.material.icons.filled.LibraryMusic @@ -28,7 +29,10 @@ enum class BottomTab(val labelRes: Int, val icon: ImageVector) { @Composable fun BottomNavBar(selectedTab: BottomTab, onTabSelected: (BottomTab) -> Unit) { - NavigationBar { + // Zero: MiniPlayerBar always sits below this now, so this is never actually the true + // bottom-most element - it would otherwise pad itself for a nav-bar inset that isn't + // adjacent to it anymore, leaving a dead gap above MiniPlayerBar. + NavigationBar(windowInsets = WindowInsets(0, 0, 0, 0)) { BottomTab.entries.forEach { tab -> val label = stringResource(tab.labelRes) NavigationBarItem( diff --git a/app/src/main/java/com/InfernalAquatics/deepwave/ui/navigation/DeepwaveNavHost.kt b/app/src/main/java/com/InfernalAquatics/deepwave/ui/navigation/DeepwaveNavHost.kt index 44d976a..e79721f 100644 --- a/app/src/main/java/com/InfernalAquatics/deepwave/ui/navigation/DeepwaveNavHost.kt +++ b/app/src/main/java/com/InfernalAquatics/deepwave/ui/navigation/DeepwaveNavHost.kt @@ -1,6 +1,7 @@ package com.InfernalAquatics.deepwave.ui.navigation import androidx.compose.foundation.layout.Box +import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.padding import androidx.compose.material3.CircularProgressIndicator @@ -52,6 +53,13 @@ fun DeepwaveNavHost( } ?: false Scaffold( + // Zero: this Scaffold has no topBar, and MiniPlayerBar already handles its own + // bottom nav-bar inset. Without this, Scaffold falls back to reserving the raw + // system-bar insets itself (since there's no topBar to "own" them), stacking on + // top of what each screen's own Scaffold below already does - double top padding, + // and a BottomNavBar that no longer sits at the true bottom edge padding for a + // nav-bar inset that isn't there anymore. + contentWindowInsets = WindowInsets(0, 0, 0, 0), bottomBar = { if (showMiniPlayer) { MiniPlayerBar(