mirror of
https://github.com/vitorpamplona/amethyst.git
synced 2026-08-09 08:04:45 +00:00
fix: normalize bold top nav bar titles to default weight
The Buzz relay group (community) top bar and its sub-screens (members, threads, browse, channel list), the Buzz canvas, geohash chat/new/teleport screens, the single-URL and single-geohash viewers, and the Marmot group chat all forced FontWeight.Bold (geohash chat also titleMedium) on their top-bar titles, while every sibling channel header — DM rooms, public chats, ephemeral chats, live activities — and the shared TopBar wrappers render the Material3 titleLarge default at normal weight. Drop the bold (and size) overrides so all top nav bar titles share one consistent treatment. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_019N7b8D4vBvafhG9eU7M9iJ
This commit is contained in:
-2
@@ -46,7 +46,6 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.graphics.Color
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextAlign
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
@@ -134,7 +133,6 @@ fun BuzzCanvasScreen(
|
||||
Column {
|
||||
Text(
|
||||
text = stringRes(R.string.buzz_canvas_title),
|
||||
fontWeight = FontWeight.Bold,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
|
||||
+2
-3
@@ -54,7 +54,6 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.draw.clip
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
@@ -427,10 +426,10 @@ private fun GeohashChatTopBar(
|
||||
LoadCityName(
|
||||
geohashStr = geohash,
|
||||
onLoading = {
|
||||
Text("#$geohash", style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold)
|
||||
Text("#$geohash")
|
||||
},
|
||||
) { cityName ->
|
||||
Text(cityName, style = MaterialTheme.typography.titleMedium, fontWeight = FontWeight.Bold)
|
||||
Text(cityName)
|
||||
}
|
||||
Row(
|
||||
verticalAlignment = Alignment.CenterVertically,
|
||||
|
||||
+1
-2
@@ -26,7 +26,6 @@ import androidx.compose.material3.Scaffold
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.ui.navigation.navs.INav
|
||||
import com.vitorpamplona.amethyst.ui.navigation.routes.Route
|
||||
@@ -52,7 +51,7 @@ fun GeohashTeleportScreen(
|
||||
Scaffold(
|
||||
topBar = {
|
||||
TopBarExtensibleWithBackButton(
|
||||
title = { Text(stringRes(R.string.geohash_teleport_title), fontWeight = FontWeight.Bold) },
|
||||
title = { Text(stringRes(R.string.geohash_teleport_title)) },
|
||||
popBack = nav::popBack,
|
||||
)
|
||||
},
|
||||
|
||||
+1
-1
@@ -96,7 +96,7 @@ fun NewGeohashChatScreen(
|
||||
Scaffold(
|
||||
topBar = {
|
||||
TopBarExtensibleWithBackButton(
|
||||
title = { Text("New location channel", fontWeight = FontWeight.Bold) },
|
||||
title = { Text("New location channel") },
|
||||
popBack = nav::popBack,
|
||||
)
|
||||
},
|
||||
|
||||
+2
@@ -36,6 +36,7 @@ import androidx.compose.runtime.remember
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.res.pluralStringResource
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
import com.vitorpamplona.amethyst.R
|
||||
@@ -103,6 +104,7 @@ fun MarmotGroupChatScreen(
|
||||
DisplayUserSetAsSubject(
|
||||
userList = memberPubkeys,
|
||||
accountViewModel = accountViewModel,
|
||||
fontWeight = FontWeight.Normal,
|
||||
)
|
||||
} else {
|
||||
Text(stringRes(R.string.marmot_group_default_name))
|
||||
|
||||
-1
@@ -109,7 +109,6 @@ fun RelayGroupBrowseScreen(
|
||||
title = {
|
||||
Text(
|
||||
text = stringRes(R.string.relay_group_browse_title),
|
||||
fontWeight = FontWeight.Bold,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
|
||||
-1
@@ -280,7 +280,6 @@ fun RelayGroupChannelListScreen(
|
||||
title = {
|
||||
Text(
|
||||
text = relay.displayUrl(),
|
||||
fontWeight = FontWeight.Bold,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.MiddleEllipsis,
|
||||
)
|
||||
|
||||
-1
@@ -178,7 +178,6 @@ private fun RelayGroupMembers(
|
||||
Column {
|
||||
Text(
|
||||
text = stringRes(R.string.relay_group_members_title),
|
||||
fontWeight = FontWeight.Bold,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
|
||||
-1
@@ -154,7 +154,6 @@ private fun RelayGroupThreads(
|
||||
Column {
|
||||
Text(
|
||||
text = stringRes(R.string.relay_group_threads_title),
|
||||
fontWeight = FontWeight.Bold,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
)
|
||||
|
||||
-3
@@ -45,7 +45,6 @@ import androidx.compose.runtime.setValue
|
||||
import androidx.compose.ui.Alignment
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.platform.LocalContext
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.compose.ui.unit.dp
|
||||
import androidx.lifecycle.compose.collectAsStateWithLifecycle
|
||||
@@ -128,7 +127,6 @@ fun RelayGroupTopBar(
|
||||
} else {
|
||||
Text(
|
||||
text = channel.toBestDisplayName(),
|
||||
fontWeight = FontWeight.Bold,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = Modifier.weight(1f, fill = false),
|
||||
@@ -340,7 +338,6 @@ private fun DmParticipantTitle(
|
||||
val name by observeUserName(user, accountViewModel)
|
||||
Text(
|
||||
text = name.ifBlank { channel.toBestDisplayName() },
|
||||
fontWeight = FontWeight.Bold,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
modifier = modifier,
|
||||
|
||||
-2
@@ -26,7 +26,6 @@ import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.runtime.getValue
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.vitorpamplona.amethyst.R
|
||||
import com.vitorpamplona.amethyst.commons.icons.symbols.MaterialSymbols
|
||||
@@ -124,7 +123,6 @@ fun DisplayGeoTagHeader(
|
||||
LoadCityName(geohashStr = geohash) { cityName ->
|
||||
Text(
|
||||
cityName,
|
||||
fontWeight = FontWeight.Bold,
|
||||
modifier = modifier,
|
||||
)
|
||||
}
|
||||
|
||||
@@ -24,7 +24,6 @@ import android.annotation.SuppressLint
|
||||
import androidx.compose.material3.Text
|
||||
import androidx.compose.runtime.Composable
|
||||
import androidx.compose.ui.Modifier
|
||||
import androidx.compose.ui.text.font.FontWeight
|
||||
import androidx.compose.ui.text.style.TextOverflow
|
||||
import androidx.lifecycle.viewmodel.compose.viewModel
|
||||
import com.vitorpamplona.amethyst.ui.feeds.WatchLifecycleAndUpdateModel
|
||||
@@ -114,7 +113,6 @@ fun DisplayUrlHeader(
|
||||
) {
|
||||
Text(
|
||||
url,
|
||||
fontWeight = FontWeight.Bold,
|
||||
modifier = modifier,
|
||||
maxLines = 1,
|
||||
overflow = TextOverflow.Ellipsis,
|
||||
|
||||
Reference in New Issue
Block a user