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
|
@Composable
|
||||||
private fun SupportCard(onDonate: () -> Unit) {
|
private fun SupportCard(onDonate: () -> Unit) {
|
||||||
val colors = LocalGeoColors.current
|
val colors = LocalGeoColors.current
|
||||||
@@ -196,7 +196,7 @@ private fun SupportCard(onDonate: () -> Unit) {
|
|||||||
.background(colors.primaryContainer),
|
.background(colors.primaryContainer),
|
||||||
contentAlignment = Alignment.Center
|
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)) {
|
Column(modifier = Modifier.weight(1f)) {
|
||||||
RowTitle(stringResource(R.string.support_title))
|
RowTitle(stringResource(R.string.support_title))
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ import cc.skysparkle.fogwave.ui.theme.LocalGeoColors
|
|||||||
@Composable
|
@Composable
|
||||||
fun TopBrandBar(
|
fun TopBrandBar(
|
||||||
modifier: Modifier = Modifier,
|
modifier: Modifier = Modifier,
|
||||||
|
showLogo: Boolean = true,
|
||||||
showSearch: Boolean = false,
|
showSearch: Boolean = false,
|
||||||
isSearchOpen: Boolean = false,
|
isSearchOpen: Boolean = false,
|
||||||
query: String = "",
|
query: String = "",
|
||||||
@@ -69,11 +70,16 @@ fun TopBrandBar(
|
|||||||
verticalAlignment = Alignment.CenterVertically,
|
verticalAlignment = Alignment.CenterVertically,
|
||||||
horizontalArrangement = Arrangement.spacedBy(10.dp)
|
horizontalArrangement = Arrangement.spacedBy(10.dp)
|
||||||
) {
|
) {
|
||||||
|
if (showLogo) {
|
||||||
AppIcon(
|
AppIcon(
|
||||||
resId = R.drawable.ic_fogwave_logo,
|
resId = R.drawable.ic_fogwave_logo,
|
||||||
contentDescription = stringResource(R.string.fogwave_logo_content_desc),
|
contentDescription = stringResource(R.string.fogwave_logo_content_desc),
|
||||||
size = 30.dp
|
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) {
|
Box(modifier = Modifier.weight(1f), contentAlignment = Alignment.Center) {
|
||||||
AnimatedContent(
|
AnimatedContent(
|
||||||
|
|||||||
@@ -151,6 +151,8 @@ fun HomeScreen(
|
|||||||
|
|
||||||
Column(modifier = Modifier.fillMaxSize()) {
|
Column(modifier = Modifier.fillMaxSize()) {
|
||||||
TopBrandBar(
|
TopBrandBar(
|
||||||
|
// The About tab already shows the logo in its header card
|
||||||
|
showLogo = uiState.selectedTab != AppTab.ABOUT,
|
||||||
showSearch = uiState.selectedTab == AppTab.RADIO,
|
showSearch = uiState.selectedTab == AppTab.RADIO,
|
||||||
isSearchOpen = isSearchOpen,
|
isSearchOpen = isSearchOpen,
|
||||||
query = query,
|
query = query,
|
||||||
|
|||||||
Reference in New Issue
Block a user