mirror of
https://github.com/simplex-chat/simplex-chat.git
synced 2026-08-17 00:10:33 +00:00
SIMPLEX: darker chat list background and fainter dividers
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.
This commit is contained in:
@@ -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
|
||||
|
||||
+2
-2
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -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_(
|
||||
|
||||
+4
-4
@@ -198,7 +198,7 @@ fun ChatListView(chatModel: ChatModel, userPickerState: MutableStateFlow<Animate
|
||||
}
|
||||
val searchText = rememberSaveable(stateSaver = TextFieldValue.Saver) { mutableStateOf(TextFieldValue("")) }
|
||||
val listState = rememberLazyListState(lazyListState.first, lazyListState.second)
|
||||
Box(Modifier.fillMaxSize()) {
|
||||
Box(Modifier.fillMaxSize().let { if (CurrentColors.value.base == DefaultTheme.SIMPLEX) it.background(oklch(0.1648f, 0.0358f, 276.77f)) else it }) {
|
||||
if (oneHandUI.value) {
|
||||
ChatListWithLoadingScreen(searchText, listState)
|
||||
Column(Modifier.align(Alignment.BottomCenter)) {
|
||||
@@ -820,7 +820,7 @@ private fun ChatListSearchBar(listState: LazyListState, searchText: MutableState
|
||||
}
|
||||
}
|
||||
val oneHandUI = remember { appPrefs.oneHandUI.state }
|
||||
Divider(Modifier.align(if (oneHandUI.value) Alignment.TopStart else Alignment.BottomStart))
|
||||
Divider(Modifier.align(if (oneHandUI.value) Alignment.TopStart else Alignment.BottomStart), color = dividerColor())
|
||||
}
|
||||
}
|
||||
|
||||
@@ -949,7 +949,7 @@ private fun BoxScope.ChatList(searchText: MutableState<TextFieldValue>, 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<TextFieldValue>, listStat
|
||||
} else {
|
||||
ChatListSearchBar(listState, searchText, searchShowingSimplexLink, searchChatFilteredBySimplexLink)
|
||||
TagsView(searchText)
|
||||
Divider()
|
||||
Divider(color = dividerColor())
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+3
-2
@@ -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())
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user