mirror of
https://github.com/austinried/subtracks.git
synced 2026-11-11 15:29:15 +01:00
fill the tab bar safe area and keep the fab above the bar
This commit is contained in:
@@ -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,
|
||||||
|
|||||||
Reference in New Issue
Block a user