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:
+12
-7
@@ -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) {
|
||||
OutlinedButton(
|
||||
IconButton(
|
||||
onClick = {
|
||||
editingDisplayName = displayName ?: ""
|
||||
showEditDialog = true
|
||||
},
|
||||
modifier = Modifier.size(32.dp),
|
||||
) {
|
||||
Icon(
|
||||
MaterialSymbols.Edit,
|
||||
contentDescription = "Edit profile",
|
||||
modifier = Modifier.size(18.dp),
|
||||
contentDescription = "Edit Profile",
|
||||
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) {
|
||||
Column(horizontalAlignment = Alignment.End) {
|
||||
Button(
|
||||
@@ -536,6 +539,8 @@ fun UserProfileScreen(
|
||||
}
|
||||
},
|
||||
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 isFollowing = (state as? com.vitorpamplona.amethyst.commons.state.LoadingState.Success)?.data?.isFollowing ?: false
|
||||
|
||||
Reference in New Issue
Block a user