From 963140e9a05dd7382b7a97d0f732f64920ad1d30 Mon Sep 17 00:00:00 2001 From: another-simple-pixel Date: Sun, 17 May 2026 07:52:03 -0700 Subject: [PATCH] UserPicker.android: align profile boxes with menu card left edge (CARD_PADDING) --- .../common/views/chatlist/UserPicker.android.kt | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/apps/multiplatform/common/src/androidMain/kotlin/chat/simplex/common/views/chatlist/UserPicker.android.kt b/apps/multiplatform/common/src/androidMain/kotlin/chat/simplex/common/views/chatlist/UserPicker.android.kt index a09ca2792b..cd940d37d1 100644 --- a/apps/multiplatform/common/src/androidMain/kotlin/chat/simplex/common/views/chatlist/UserPicker.android.kt +++ b/apps/multiplatform/common/src/androidMain/kotlin/chat/simplex/common/views/chatlist/UserPicker.android.kt @@ -1,5 +1,6 @@ package chat.simplex.common.views.chatlist +import CARD_PADDING import SectionItemView import androidx.compose.foundation.* import androidx.compose.foundation.gestures.Orientation @@ -50,7 +51,7 @@ actual fun UserPickerUsersSection( Row( modifier = Modifier.horizontalScroll(scrollState), ) { - Spacer(Modifier.width(DEFAULT_PADDING)) + Spacer(Modifier.width(CARD_PADDING)) Row(horizontalArrangement = Arrangement.spacedBy(USER_PICKER_ROW_PADDING)) { users.forEach { u -> UserPickerUserBox(u, stopped, modifier = Modifier.userBoxWidth(u.user, users.size, screenWidthDp)) { @@ -62,7 +63,7 @@ actual fun UserPickerUsersSection( } } } - Spacer(Modifier.width(DEFAULT_PADDING)) + Spacer(Modifier.width(CARD_PADDING)) } } } @@ -219,10 +220,10 @@ private fun Modifier.draggableBottomDrawerModifier( private fun Modifier.userBoxWidth(user: User, totalUsers: Int, windowWidth: Dp): Modifier { return if (totalUsers == 1) { - this.width(windowWidth - DEFAULT_PADDING * 2) + this.width(windowWidth - CARD_PADDING * 2) } else if (user.activeUser) { - this.width(windowWidth - DEFAULT_PADDING - (USER_PICKER_ROW_PADDING * 3) - USER_PICKER_IMAGE_SIZE) + this.width(windowWidth - CARD_PADDING - (USER_PICKER_ROW_PADDING * 3) - USER_PICKER_IMAGE_SIZE) } else { - this.widthIn(max = (windowWidth - (DEFAULT_PADDING * 2)) * 0.618f) + this.widthIn(max = (windowWidth - (CARD_PADDING * 2)) * 0.618f) } } \ No newline at end of file