fix(desktop): compact Profile header buttons

"Edit Profile" was an OutlinedButton with icon + text which rendered
at ~40dp tall — taller than the 32dp IconButtons every other screen
uses in its header row, so it was pushing the Profile title down and
inflating the top border of the whole page.

- Edit Profile → IconButton(size = 32.dp) with Edit icon (size = 20.dp)
  tinted primary. Matches the + / refresh / relays pattern on Home,
  Reads, Notifications, etc.
- Follow / Unfollow button (when viewing someone else's profile) —
  kept as a labelled Button for clarity but compacted to height 32.dp
  with contentPadding(horizontal = 12.dp, vertical = 0.dp) so it
  matches the header row's scale.

https://claude.ai/code/session_01NufduPfZvYQVYwLkbCjCUo
This commit is contained in:
Claude
2026-04-24 15:57:49 +00:00
parent 7da69fbaee
commit 8ae4ce6f91
@@ -491,25 +491,28 @@ fun UserProfileScreen(
) )
} }
// Edit button for own profile // Edit button for own profile — compact IconButton to match
// the action-icon pattern every other screen's header uses.
if (isOwnProfile && account.isReadOnly == false) { if (isOwnProfile && account.isReadOnly == false) {
OutlinedButton( IconButton(
onClick = { onClick = {
editingDisplayName = displayName ?: "" editingDisplayName = displayName ?: ""
showEditDialog = true showEditDialog = true
}, },
modifier = Modifier.size(32.dp),
) { ) {
Icon( Icon(
MaterialSymbols.Edit, MaterialSymbols.Edit,
contentDescription = "Edit profile", contentDescription = "Edit Profile",
modifier = Modifier.size(18.dp), tint = MaterialTheme.colorScheme.primary,
modifier = Modifier.size(20.dp),
) )
Spacer(Modifier.width(8.dp))
Text("Edit Profile")
} }
} }
// Follow/Unfollow button for other profiles // Follow/Unfollow button for other profiles — compact to
// match the header row height (32dp); primary-coloured
// text button so the affordance is still legible.
if (account != null && !account.isReadOnly && pubKeyHex != account.pubKeyHex) { if (account != null && !account.isReadOnly && pubKeyHex != account.pubKeyHex) {
Column(horizontalAlignment = Alignment.End) { Column(horizontalAlignment = Alignment.End) {
Button( Button(
@@ -536,6 +539,8 @@ fun UserProfileScreen(
} }
}, },
enabled = contactListLoaded && followState.state.value !is com.vitorpamplona.amethyst.commons.state.LoadingState.Loading, enabled = contactListLoaded && followState.state.value !is com.vitorpamplona.amethyst.commons.state.LoadingState.Loading,
modifier = Modifier.height(32.dp),
contentPadding = PaddingValues(horizontal = 12.dp, vertical = 0.dp),
) { ) {
val state = followState.state.collectAsState().value val state = followState.state.collectAsState().value
val isFollowing = (state as? com.vitorpamplona.amethyst.commons.state.LoadingState.Success)?.data?.isFollowing ?: false val isFollowing = (state as? com.vitorpamplona.amethyst.commons.state.LoadingState.Success)?.data?.isFollowing ?: false