mirror of
https://github.com/kalarina-bit/Fogwave.git
synced 2026-11-22 08:06:09 +00:00
Show the logo only once on the About tab
This commit is contained in:
@@ -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)
|
||||
) {
|
||||
AppIcon(
|
||||
resId = R.drawable.ic_fogwave_logo,
|
||||
contentDescription = stringResource(R.string.fogwave_logo_content_desc),
|
||||
size = 30.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,
|
||||
|
||||
Reference in New Issue
Block a user