pad the tab container so it matches the settings container height

This commit is contained in:
austinried
2026-10-04 00:29:57 +00:00
parent e0ffb48715
commit 4fcdf7f5fb
@@ -684,7 +684,11 @@ private fun LibraryTabs(
Modifier Modifier
.clip(RoundedCornerShape(8.dp)) .clip(RoundedCornerShape(8.dp))
.background(headerColor) .background(headerColor)
.drawBehind { .padding(6.dp),
) {
Box(
modifier =
Modifier.drawBehind {
if (current != null && indicatorLeft != null && indicatorRight != null) { if (current != null && indicatorLeft != null && indicatorRight != null) {
drawRoundRect( drawRoundRect(
color = indicatorColor, color = indicatorColor,
@@ -694,29 +698,30 @@ private fun LibraryTabs(
) )
} }
}, },
) {
Row(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(4.dp),
) { ) {
LibraryTab.entries.forEachIndexed { index, tab -> Row(
TabButton( verticalAlignment = Alignment.CenterVertically,
tab = tab, horizontalArrangement = Arrangement.spacedBy(4.dp),
artwork = artwork, ) {
progress = LibraryTab.entries.forEachIndexed { index, tab ->
when (index) { TabButton(
page -> 1f - transition tab = tab,
page + (if (fraction >= 0f) 1 else -1) -> transition artwork = artwork,
else -> 0f progress =
}, when (index) {
indicatorLeft = indicatorLeft, page -> 1f - transition
indicatorRight = indicatorRight, page + (if (fraction >= 0f) 1 else -1) -> transition
onClick = { onTabSelected(tab) }, else -> 0f
modifier = },
Modifier.onGloballyPositioned { coordinates -> indicatorLeft = indicatorLeft,
bounds[index] = coordinates.boundsInParent() indicatorRight = indicatorRight,
}, onClick = { onTabSelected(tab) },
) modifier =
Modifier.onGloballyPositioned { coordinates ->
bounds[index] = coordinates.boundsInParent()
},
)
}
} }
} }
} }