From 0fd51ffa991eda59b4fce6bd0e4ef91e24f5f55a Mon Sep 17 00:00:00 2001 From: hayk888997 Date: Tue, 24 Feb 2026 02:35:51 +0400 Subject: [PATCH] Done changes to support dark theme --- .../views/invitation_redesign/InviteSomeoneView.kt | 7 +++---- .../invitation_redesign/ConnectViewLinkOrQrModal.kt | 8 ++++---- .../views/invitation_redesign/InviteCardComponent.kt | 12 ++++++------ .../views/invitation_redesign/InviteSomeoneView.kt | 4 ++-- 4 files changed, 15 insertions(+), 16 deletions(-) diff --git a/apps/multiplatform/android/src/main/java/chat/simplex/app/views/invitation_redesign/InviteSomeoneView.kt b/apps/multiplatform/android/src/main/java/chat/simplex/app/views/invitation_redesign/InviteSomeoneView.kt index 52cd13ab35..c442c72314 100644 --- a/apps/multiplatform/android/src/main/java/chat/simplex/app/views/invitation_redesign/InviteSomeoneView.kt +++ b/apps/multiplatform/android/src/main/java/chat/simplex/app/views/invitation_redesign/InviteSomeoneView.kt @@ -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) diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/ConnectViewLinkOrQrModal.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/ConnectViewLinkOrQrModal.kt index 56d4690fbf..f47402b396 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/ConnectViewLinkOrQrModal.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/ConnectViewLinkOrQrModal.kt @@ -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, 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, 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) { diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/InviteCardComponent.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/InviteCardComponent.kt index e976ff040e..9db07e7c3d 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/InviteCardComponent.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/InviteCardComponent.kt @@ -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 ) } } diff --git a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/InviteSomeoneView.kt b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/InviteSomeoneView.kt index f04322bb77..996aecf196 100644 --- a/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/InviteSomeoneView.kt +++ b/apps/multiplatform/common/src/commonMain/kotlin/chat/simplex/common/views/invitation_redesign/InviteSomeoneView.kt @@ -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)