Done changes to support dark theme

This commit is contained in:
hayk888997
2026-02-24 02:35:51 +04:00
parent 98a56b6278
commit 0fd51ffa99
4 changed files with 15 additions and 16 deletions

View File

@@ -11,7 +11,6 @@ import androidx.compose.material.*
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier
import androidx.compose.ui.graphics.Color
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import dev.icerock.moko.resources.compose.painterResource
@@ -27,7 +26,7 @@ import chat.simplex.res.MR
fun InviteSomeoneView(close: () -> Unit) {
ModalView(close) {
ColumnWithScrollBar(
Modifier.fillMaxSize().background(Color.White),
Modifier.fillMaxSize().background(MaterialTheme.colors.background),
horizontalAlignment = Alignment.CenterHorizontally
) {
AppBarTitle(stringResource(MR.strings.invite_someone), withPadding = false)
@@ -44,7 +43,7 @@ fun InviteSomeoneContent() {
shape = RoundedCornerShape(18.dp),
color = MaterialTheme.appColors.sentMessage,
modifier = Modifier
.fillMaxSize().background(Color.White)
.fillMaxSize().background(MaterialTheme.colors.background)
.padding(horizontal = DEFAULT_PADDING)
.clickable {
ModalManager.start.showModalCloseable { close ->
@@ -148,7 +147,7 @@ fun InviteSomeoneContent() {
fun PreviewInviteSomeoneView() {
SimpleXTheme {
ColumnWithScrollBar(
Modifier.fillMaxSize().background(Color.White),
Modifier.fillMaxSize().background(MaterialTheme.colors.background),
horizontalAlignment = Alignment.CenterHorizontally
) {
AppBarTitle(stringResource(MR.strings.invite_someone), withPadding = false)

View File

@@ -42,7 +42,7 @@ fun ModalData.ConnectViewLinkOrQrModal(rhId: Long?, close: () -> Unit) {
ModalView(close) {
ColumnWithScrollBar(
Modifier.fillMaxWidth().background(Color(0xfff5f5f6)),
Modifier.fillMaxWidth().background(MaterialTheme.colors.background),
horizontalAlignment = Alignment.CenterHorizontally
) {
Spacer(Modifier.height(24.dp))
@@ -114,7 +114,7 @@ private fun ConnectPasteLinkView(rhId: Long?, pastedLink: MutableState<String>,
Box(
Modifier
.weight(1f)
.background(Color(0xFFF2F2F7)) // light gray outer background
.background(MaterialTheme.colors.background)
.padding(8.dp),
contentAlignment = Alignment.Center
) {
@@ -122,13 +122,13 @@ private fun ConnectPasteLinkView(rhId: Long?, pastedLink: MutableState<String>,
Modifier
.fillMaxWidth()
.clip(RoundedCornerShape(16.dp))
.background(Color.White),
.background(MaterialTheme.colors.surface),
contentAlignment = Alignment.Center
) {
Text(
stringResource(MR.strings.tap_to_paste_link),
modifier = Modifier.padding(vertical = 16.dp),
color = Color.Black.copy(alpha = 0.3f),
color = MaterialTheme.colors.secondary,
fontSize = 18.sp
)
if (connectProgressManager.showConnectProgress != null) {

View File

@@ -29,7 +29,7 @@ import androidx.compose.ui.layout.ContentScale
import androidx.compose.ui.text.font.FontWeight
import androidx.compose.ui.unit.dp
import androidx.compose.ui.unit.sp
import chat.simplex.common.ui.theme.DEFAULT_PADDING
import chat.simplex.common.ui.theme.*
import chat.simplex.res.MR
import dev.icerock.moko.resources.compose.painterResource
import dev.icerock.moko.resources.compose.stringResource
@@ -49,7 +49,7 @@ fun InviteCardComponent(
) {
Card(
shape = RoundedCornerShape(24.dp),
backgroundColor = Color(0xfff5f5f6),
backgroundColor = MaterialTheme.appColors.sentMessage,
elevation = 0.dp,
modifier = Modifier
.fillMaxWidth()
@@ -92,7 +92,7 @@ fun InviteCardComponent(
fontSize = 18.sp,
fontWeight = FontWeight.Medium
),
color = Color.Black
color = MaterialTheme.colors.onBackground
)
}
@@ -101,7 +101,7 @@ fun InviteCardComponent(
Text(
description,
style = MaterialTheme.typography.body2.copy(fontSize = 14.sp),
color = Color.Gray
color = MaterialTheme.colors.secondary
)
}
@@ -117,12 +117,12 @@ fun InviteCardComponent(
Text(
"\u2022 ",
style = MaterialTheme.typography.body1.copy(fontWeight = FontWeight.Bold),
color = Color.Black
color = MaterialTheme.colors.onBackground
)
Text(
point,
style = MaterialTheme.typography.body1,
color = Color.Black
color = MaterialTheme.colors.onBackground
)
}
}

View File

@@ -28,7 +28,7 @@ import chat.simplex.res.MR
fun InviteSomeoneView(close: () -> Unit) {
ModalView(close) {
ColumnWithScrollBar(
Modifier.fillMaxSize().background(Color.White),
Modifier.fillMaxSize().background(MaterialTheme.colors.background),
horizontalAlignment = Alignment.CenterHorizontally
) {
AppBarTitle(stringResource(MR.strings.invite_someone), withPadding = false)
@@ -87,7 +87,7 @@ fun InviteSomeoneContent() {
fun PreviewInviteSomeoneView() {
SimpleXTheme {
ColumnWithScrollBar(
Modifier.fillMaxSize().background(Color.White),
Modifier.fillMaxSize().background(MaterialTheme.colors.background),
horizontalAlignment = Alignment.CenterHorizontally
) {
AppBarTitle(stringResource(MR.strings.invite_someone), withPadding = false)