From bb3abe39b66492b6e45a79a033a641e982cb7898 Mon Sep 17 00:00:00 2001 From: austinried <4966622+austinried@users.noreply.github.com> Date: Wed, 21 Oct 2026 06:46:47 +0000 Subject: [PATCH] ui: tighten the offline strip and separate it from the tabs Drop the strip's fixed 44dp height so it wraps its content, and draw a divider between the strip and the tab bar. The label now sits 6dp above the rule instead of 12dp above the tab icons, which read as one gap. --- .../com/subtracks/ui/library/LibraryScreen.kt | 66 ++++++++++--------- 1 file changed, 34 insertions(+), 32 deletions(-) diff --git a/app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt b/app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt index cc1b3899..0f0ce8bf 100644 --- a/app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt +++ b/app/src/main/kotlin/com/subtracks/ui/library/LibraryScreen.kt @@ -17,7 +17,6 @@ import androidx.compose.foundation.layout.WindowInsets import androidx.compose.foundation.layout.fillMaxSize import androidx.compose.foundation.layout.fillMaxWidth import androidx.compose.foundation.layout.height -import androidx.compose.foundation.layout.heightIn import androidx.compose.foundation.layout.offset import androidx.compose.foundation.layout.padding import androidx.compose.foundation.layout.size @@ -50,6 +49,7 @@ import androidx.compose.material3.FilterChip import androidx.compose.material3.FilterChipDefaults import androidx.compose.material3.FloatingActionButton import androidx.compose.material3.FloatingActionButtonDefaults +import androidx.compose.material3.HorizontalDivider import androidx.compose.material3.Icon import androidx.compose.material3.IconButton import androidx.compose.material3.LocalContentColor @@ -1017,39 +1017,41 @@ private fun OfflineStrip( onGoOnline: () -> Unit, modifier: Modifier = Modifier, ) { - Surface( - onClick = onGoOnline, - color = Color.Transparent, - contentColor = MaterialTheme.colorScheme.onBackground, - modifier = modifier.fillMaxWidth(), - ) { - Row( - modifier = - Modifier - .fillMaxWidth() - .heightIn(min = 44.dp) - .padding(horizontal = 16.dp, vertical = 6.dp), - verticalAlignment = Alignment.CenterVertically, - horizontalArrangement = Arrangement.spacedBy(8.dp), + Column(modifier.fillMaxWidth()) { + Surface( + onClick = onGoOnline, + color = Color.Transparent, + contentColor = MaterialTheme.colorScheme.onBackground, + modifier = Modifier.fillMaxWidth(), ) { - Icon( - imageVector = Icons.Rounded.CloudOff, - contentDescription = null, - tint = MaterialTheme.colorScheme.primary, - modifier = Modifier.size(18.dp), - ) - Text( - text = stringResource(R.string.offline_mode_banner), - style = MaterialTheme.typography.bodyMedium, - maxLines = 2, - modifier = Modifier.weight(1f), - ) - Text( - text = stringResource(R.string.offline_go_online), - style = MaterialTheme.typography.labelLarge, - color = MaterialTheme.colorScheme.primary, - ) + Row( + modifier = + Modifier + .fillMaxWidth() + .padding(horizontal = 16.dp, vertical = 6.dp), + verticalAlignment = Alignment.CenterVertically, + horizontalArrangement = Arrangement.spacedBy(8.dp), + ) { + Icon( + imageVector = Icons.Rounded.CloudOff, + contentDescription = null, + tint = MaterialTheme.colorScheme.primary, + modifier = Modifier.size(18.dp), + ) + Text( + text = stringResource(R.string.offline_mode_banner), + style = MaterialTheme.typography.bodyMedium, + maxLines = 2, + modifier = Modifier.weight(1f), + ) + Text( + text = stringResource(R.string.offline_go_online), + style = MaterialTheme.typography.labelLarge, + color = MaterialTheme.colorScheme.primary, + ) + } } + HorizontalDivider(color = MaterialTheme.colorScheme.outlineVariant) } }