From bbff7d60eeeaf400e5767ce9002701ad2b8d78da Mon Sep 17 00:00:00 2001 From: another-simple-pixel Date: Sat, 4 Jul 2026 09:18:08 -0700 Subject: [PATCH] SIMPLEX: darker chat list background and fainter dividers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit On the SIMPLEX theme the chat-list screen should sit on a panel darker than the palette background, and its hairline dividers should be fainter over that dark surface than the Material default. Give the chat-list container a SIMPLEX-only dark background (#0A0D1C), and add a dividerColor() helper that drops divider alpha to 0.05 on SIMPLEX — every other theme keeps Material's default (onSurface at 0.12), unchanged. Applied to the chrome dividers: chat list, chat, compose bar and top app bar. --- .../kotlin/chat/simplex/common/ui/theme/Theme.kt | 6 ++++++ .../kotlin/chat/simplex/common/views/chat/ChatView.kt | 4 ++-- .../kotlin/chat/simplex/common/views/chat/ComposeView.kt | 4 ++-- .../chat/simplex/common/views/chatlist/ChatListView.kt | 8 ++++---- .../chat/simplex/common/views/helpers/DefaultTopAppBar.kt | 5 +++-- 5 files changed, 17 insertions(+), 10 deletions(-) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/ui/theme/Theme.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/ui/theme/Theme.kt index b8dc9ff6d8..33a4fad946 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/ui/theme/Theme.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/ui/theme/Theme.kt @@ -645,6 +645,12 @@ fun themedBackgroundBrush(): Brush = Brush.linearGradient( Offset(Float.POSITIVE_INFINITY, 0f) ) +// Hairline dividers: SIMPLEX wants them fainter over its dark panels; every other +// theme keeps Material's default (onSurface at 0.12 alpha), unchanged. +@Composable +fun dividerColor(): Color = + MaterialTheme.colors.onSurface.copy(alpha = if (CurrentColors.value.base == DefaultTheme.SIMPLEX) 0.05f else 0.12f) + val DEFAULT_PADDING = 20.dp val DEFAULT_ONBOARDING_HORIZONTAL_PADDING = 25.dp val DEFAULT_SPACE_AFTER_ICON = 4.dp diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt index 4a3bfe4208..a4ac6913e1 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ChatView.kt @@ -60,7 +60,7 @@ data class ItemSeparation(val timestamp: Boolean, val largeGap: Boolean, val dat @Composable fun ConnectInProgressView(s: String) { Surface(color = MaterialTheme.colors.background) { - Divider() + Divider(color = dividerColor()) Row( Modifier .height(60.dp) @@ -1713,7 +1713,7 @@ private fun SupportChatsCountToolbar( } } } - Divider(Modifier.align(Alignment.BottomStart)) + Divider(Modifier.align(Alignment.BottomStart), color = dividerColor()) } } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt index c37aa0a77f..15b014c0d0 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chat/ComposeView.kt @@ -1637,7 +1637,7 @@ fun ComposeView( } Surface(color = MaterialTheme.colors.background, contentColor = MaterialTheme.colors.onBackground) { - Divider() + Divider(color = dividerColor()) if (chat.chatInfo is ChatInfo.Group && chat.chatInfo.groupInfo.nextConnectPrepared) { if (chat.chatInfo.groupInfo.businessChat == null) { val isChannel = chat.chatInfo.groupInfo.useRelays @@ -1656,7 +1656,7 @@ fun ComposeView( } else if (nextSendGrpInv.value) { Column { ContextSendMessageToConnect(generalGetString(MR.strings.compose_send_direct_message_to_connect)) - Divider() + Divider(color = dividerColor()) Row(Modifier.padding(end = 8.dp), verticalAlignment = Alignment.Bottom) { AttachmentAndCommandsButtons() SendMsgView_( diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt index 3012525f9b..bd4a18f5f3 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/chatlist/ChatListView.kt @@ -198,7 +198,7 @@ fun ChatListView(chatModel: ChatModel, userPickerState: MutableStateFlow, listStat ) { if (oneHandUI.value) { Column(Modifier.consumeWindowInsets(WindowInsets.navigationBars).consumeWindowInsets(PaddingValues(bottom = AppBarHeight))) { - Divider() + Divider(color = dividerColor()) TagsView(searchText) ChatListSearchBar(listState, searchText, searchShowingSimplexLink, searchChatFilteredBySimplexLink) Spacer(Modifier.windowInsetsBottomHeight(WindowInsets.ime)) @@ -957,7 +957,7 @@ private fun BoxScope.ChatList(searchText: MutableState, listStat } else { ChatListSearchBar(listState, searchText, searchShowingSimplexLink, searchChatFilteredBySimplexLink) TagsView(searchText) - Divider() + Divider(color = dividerColor()) } } } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/DefaultTopAppBar.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/DefaultTopAppBar.kt index 81fac40a40..f08ea5e873 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/DefaultTopAppBar.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/helpers/DefaultTopAppBar.kt @@ -170,10 +170,11 @@ private fun BoxScope.AppBarDivider(onTop: Boolean, fixedAlpha: Boolean, connecti .align(if (onTop) Alignment.BottomStart else Alignment.TopStart) .graphicsLayer { alpha = if (!onTop || fixedAlpha) 1f else topTitleAlpha(false, connection, 1f) - } + }, + color = dividerColor() ) } else { - Divider(Modifier.align(if (onTop) Alignment.BottomStart else Alignment.TopStart)) + Divider(Modifier.align(if (onTop) Alignment.BottomStart else Alignment.TopStart), color = dividerColor()) } }