Show the logo only once on the About tab

This commit is contained in:
2026-11-18 17:59:14 +02:00
parent cd2c7426ce
commit 2e43d4d0d9
3 changed files with 15 additions and 7 deletions
@@ -180,7 +180,7 @@ private fun AppHeader() {
}
}
/** Asks for a donation: the app icon, a short note and one button. */
/** Asks for a donation: a heart, a short note and one button. */
@Composable
private fun SupportCard(onDonate: () -> Unit) {
val colors = LocalGeoColors.current
@@ -196,7 +196,7 @@ private fun SupportCard(onDonate: () -> Unit) {
.background(colors.primaryContainer),
contentAlignment = Alignment.Center
) {
AppIcon(resId = R.drawable.ic_fogwave_logo, size = 32.dp)
AppIcon(resId = R.drawable.ic_heart_fill, tint = colors.primary, size = 22.dp)
}
Column(modifier = Modifier.weight(1f)) {
RowTitle(stringResource(R.string.support_title))
@@ -50,6 +50,7 @@ import cc.skysparkle.fogwave.ui.theme.LocalGeoColors
@Composable
fun TopBrandBar(
modifier: Modifier = Modifier,
showLogo: Boolean = true,
showSearch: Boolean = false,
isSearchOpen: Boolean = false,
query: String = "",
@@ -69,11 +70,16 @@ fun TopBrandBar(
verticalAlignment = Alignment.CenterVertically,
horizontalArrangement = Arrangement.spacedBy(10.dp)
) {
if (showLogo) {
AppIcon(
resId = R.drawable.ic_fogwave_logo,
contentDescription = stringResource(R.string.fogwave_logo_content_desc),
size = 30.dp
)
} else {
// Keeps the title centered where it is on the other tabs
Box(modifier = Modifier.size(30.dp))
}
Box(modifier = Modifier.weight(1f), contentAlignment = Alignment.Center) {
AnimatedContent(
@@ -151,6 +151,8 @@ fun HomeScreen(
Column(modifier = Modifier.fillMaxSize()) {
TopBrandBar(
// The About tab already shows the logo in its header card
showLogo = uiState.selectedTab != AppTab.ABOUT,
showSearch = uiState.selectedTab == AppTab.RADIO,
isSearchOpen = isSearchOpen,
query = query,