fill the tab bar safe area and keep the fab above the bar

This commit is contained in:
austinried
2026-10-04 00:29:57 +00:00
parent 4530335bd7
commit 25aa7c2aea
@@ -319,7 +319,8 @@ fun LibraryScreen(
var tabBarHeightPx by remember { mutableFloatStateOf(0f) } var tabBarHeightPx by remember { mutableFloatStateOf(0f) }
val tabBarHeight = with(density) { tabBarHeightPx.toDp() } val tabBarHeight = with(density) { tabBarHeightPx.toDp() }
val listTopInset = statusBarTop val listTopInset = statusBarTop
val listBottomInset = bottomInset + tabBarHeight + if (searchActive) SEARCH_BAR_CLEARANCE else FAB_CLEARANCE val listBottomInset = tabBarHeight + if (searchActive) SEARCH_BAR_CLEARANCE else FAB_CLEARANCE
val headerColor = artwork?.let(::playerSurfaceColor) ?: MaterialTheme.colorScheme.background
Box( Box(
modifier = modifier =
@@ -407,8 +408,9 @@ fun LibraryScreen(
Modifier Modifier
.fillMaxWidth() .fillMaxWidth()
.align(Alignment.BottomCenter) .align(Alignment.BottomCenter)
.padding(bottom = bottomInset) .background(headerColor)
.onSizeChanged { tabBarHeightPx = it.height.toFloat() }, .onSizeChanged { tabBarHeightPx = it.height.toFloat() }
.padding(bottom = bottomInset),
) { ) {
LibraryTabs( LibraryTabs(
pagerState = pagerState, pagerState = pagerState,