From 8ae4ce6f9179543c18b04e29d67b98220c622bf2 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 24 Apr 2026 15:57:49 +0000 Subject: [PATCH] fix(desktop): compact Profile header buttons MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit "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 --- .../amethyst/desktop/ui/UserProfileScreen.kt | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/UserProfileScreen.kt b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/UserProfileScreen.kt index c80bddd02..0a4ae4ad6 100644 --- a/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/UserProfileScreen.kt +++ b/desktopApp/src/jvmMain/kotlin/com/vitorpamplona/amethyst/desktop/ui/UserProfileScreen.kt @@ -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