Updated on 2026-08-14

This commit is contained in:
Tangem 2025-08-08 19:36:13 +05:00
parent b93507349d
commit 0d2c403a6a
19 changed files with 44 additions and 33 deletions

View file

@ -260,13 +260,11 @@ dependencies {
/** Compose libraries */
implementation(deps.compose.constraintLayout)
implementation(deps.compose.material)
implementation(deps.compose.material3)
implementation(deps.compose.animation)
implementation(deps.compose.coil)
implementation(deps.compose.constraintLayout)
implementation(deps.compose.foundation)
implementation(deps.compose.material)
implementation(deps.compose.navigation.hilt)
implementation(deps.compose.shimmer)
implementation(deps.compose.ui)

View file

@ -12,7 +12,6 @@ dependencies {
/** Compose */
implementation(deps.compose.material3)
implementation(deps.compose.material)
implementation(deps.compose.foundation)
implementation(deps.compose.ui)
implementation(deps.compose.ui.tooling)

View file

@ -42,7 +42,6 @@ dependencies {
/** Compose */
implementation(deps.compose.constraintLayout)
implementation(deps.compose.foundation)
implementation(deps.compose.material)
implementation(deps.compose.material3)
implementation(deps.compose.paging)
implementation(deps.compose.ui.tooling)

View file

@ -4,9 +4,9 @@ import android.app.Activity
import androidx.compose.foundation.isSystemInDarkTheme
import androidx.compose.foundation.text.selection.LocalTextSelectionColors
import androidx.compose.foundation.text.selection.TextSelectionColors
import androidx.compose.material.Colors
import androidx.compose.material.MaterialTheme
import androidx.compose.material.ProvideTextStyle
import androidx.compose.material3.ColorScheme
import androidx.compose.material3.MaterialTheme
import androidx.compose.material3.ProvideTextStyle
import androidx.compose.material3.SnackbarHostState
import androidx.compose.runtime.*
import androidx.compose.ui.graphics.Color
@ -90,7 +90,7 @@ fun TangemTheme(
val rootBackgroundColor = rememberedColors.background.secondary
MaterialTheme(
colors = materialThemeColors(colors = themeColors, isDark = isDark),
colorScheme = tangemColorScheme(colors = themeColors),
) {
CompositionLocalProvider(
LocalTangemColors provides rememberedColors,
@ -143,21 +143,51 @@ object TangemTheme {
@Stable
@Composable
private fun materialThemeColors(colors: TangemColors, isDark: Boolean): Colors {
return Colors(
private fun tangemColorScheme(colors: TangemColors): ColorScheme {
return ColorScheme(
primary = colors.background.primary,
primaryVariant = colors.background.secondary,
secondary = colors.button.primary,
secondaryVariant = colors.text.accent,
background = colors.background.primary,
surface = colors.background.secondary,
error = colors.text.warning,
onPrimary = colors.text.primary1,
primaryContainer = colors.background.secondary,
onPrimaryContainer = colors.background.action,
inversePrimary = colors.background.action,
secondary = colors.button.primary,
onSecondary = colors.text.primary1,
secondaryContainer = colors.background.secondary,
onSecondaryContainer = colors.text.primary1,
tertiary = colors.background.tertiary,
onTertiary = colors.text.tertiary,
tertiaryContainer = colors.background.tertiary,
onTertiaryContainer = colors.text.tertiary,
background = colors.background.primary,
onBackground = colors.text.primary1,
surface = colors.background.secondary,
surfaceVariant = colors.background.tertiary,
onSurface = colors.text.primary1,
onSurfaceVariant = colors.text.secondary,
surfaceTint = colors.background.tertiary,
inverseSurface = colors.button.disabled,
inverseOnSurface = colors.button.primary,
surfaceBright = colors.background.secondary,
surfaceDim = colors.background.tertiary,
surfaceContainer = colors.background.tertiary,
surfaceContainerHigh = colors.background.tertiary,
surfaceContainerHighest = colors.background.tertiary,
surfaceContainerLow = colors.background.tertiary,
surfaceContainerLowest = colors.background.tertiary,
error = colors.text.warning,
errorContainer = colors.background.tertiary,
onErrorContainer = colors.text.primary2,
onError = colors.text.primary2,
isLight = !isDark,
outline = colors.stroke.primary,
outlineVariant = colors.stroke.secondary,
scrim = colors.stroke.transparency,
)
}

View file

@ -45,7 +45,6 @@ dependencies {
implementation(deps.lifecycle.runtime.ktx)
/** Compose libraries */
implementation(deps.compose.material)
implementation(deps.compose.material3)
implementation(deps.compose.animation)
implementation(deps.compose.foundation)

View file

@ -23,7 +23,6 @@ dependencies {
implementation(deps.compose.accompanist.permission)
implementation(deps.compose.accompanist.webView)
implementation(deps.compose.material3)
implementation(deps.compose.material)
/** Core modules */
implementation(projects.core.ui)

View file

@ -52,7 +52,6 @@ dependencies {
implementation(deps.lifecycle.runtime.ktx)
/** Compose libraries */
implementation(deps.compose.material) // to use buttons and text field in MultiWalletSeedPhraseImport.kt
implementation(deps.compose.material3)
implementation(deps.compose.animation)
implementation(deps.compose.foundation)

View file

@ -43,7 +43,6 @@ dependencies {
implementation(deps.compose.ui)
implementation(deps.compose.ui.tooling)
implementation(deps.compose.foundation)
implementation(deps.compose.material) // For button colors
implementation(deps.compose.material3)
implementation(deps.compose.shimmer)

View file

@ -50,7 +50,6 @@ dependencies {
/* Compose */
implementation(deps.compose.coil)
implementation(deps.compose.foundation)
implementation(deps.compose.material)
implementation(deps.compose.material3)
implementation(deps.compose.ui)
implementation(deps.compose.ui.tooling)

View file

@ -52,7 +52,6 @@ dependencies {
implementation(deps.lifecycle.runtime.ktx)
/** Compose libraries */
implementation(deps.compose.material) // to use buttons and text field in MultiWalletSeedPhraseImport.kt
implementation(deps.compose.material3)
implementation(deps.compose.animation)
implementation(deps.compose.foundation)

View file

@ -6,7 +6,7 @@ import androidx.compose.foundation.layout.Box
import androidx.compose.foundation.layout.aspectRatio
import androidx.compose.foundation.layout.fillMaxWidth
import androidx.compose.foundation.layout.size
import androidx.compose.material.Icon
import androidx.compose.material3.Icon
import androidx.compose.runtime.Composable
import androidx.compose.ui.Alignment
import androidx.compose.ui.Modifier

View file

@ -62,7 +62,6 @@ dependencies {
implementation(deps.lifecycle.runtime.ktx)
/** Compose libraries */
implementation(deps.compose.material) // to use buttons and text field in MultiWalletSeedPhraseImport.kt
implementation(deps.compose.material3)
implementation(deps.compose.animation)
implementation(deps.compose.foundation)

View file

@ -63,7 +63,6 @@ dependencies {
implementation(deps.compose.material3)
implementation(deps.compose.shimmer)
implementation(deps.compose.coil)
implementation(deps.compose.material)
/** Other */
implementation(deps.decompose.ext.compose)

View file

@ -28,7 +28,6 @@ dependencies {
/** Compose */
implementation(deps.compose.accompanist.systemUiController)
implementation(deps.compose.material3)
implementation(deps.compose.material)
implementation(deps.compose.foundation)
implementation(deps.compose.ui)
implementation(deps.compose.ui.tooling)

View file

@ -61,7 +61,6 @@ dependencies {
/** Compose */
implementation(deps.arrow.core)
implementation(deps.compose.foundation)
implementation(deps.compose.material)
implementation(deps.compose.material3)
implementation(deps.compose.ui.tooling)
implementation(deps.compose.coil)

View file

@ -17,7 +17,6 @@ dependencies {
/** Compose */
implementation(deps.compose.accompanist.systemUiController)
implementation(deps.compose.foundation)
implementation(deps.compose.material)
implementation(deps.compose.material3)
implementation(deps.compose.navigation)
implementation(deps.compose.navigation.hilt)

View file

@ -21,7 +21,6 @@ dependencies {
implementation(deps.compose.accompanist.systemUiController)
implementation(deps.compose.coil)
implementation(deps.compose.foundation)
implementation(deps.compose.material)
implementation(deps.compose.material3)
implementation(deps.compose.navigation)
implementation(deps.compose.navigation.hilt)

View file

@ -22,7 +22,6 @@ dependencies {
implementation(deps.compose.coil)
implementation(deps.compose.constraintLayout)
implementation(deps.compose.foundation)
implementation(deps.compose.material)
implementation(deps.compose.material3)
implementation(deps.compose.paging)
implementation(deps.compose.reorderable)

View file

@ -30,7 +30,6 @@ androidxWorkManager = "2.9.0"
# region Compose
compose-runtime = "1.7.4"
compose-foundation = "1.7.4"
compose-material = "1.7.4"
compose-material3 = "1.3.1"
compose-constraint = "1.0.1"
compose-navigation = "2.7.7"
@ -169,7 +168,6 @@ compose-ui-tooling = { module = "androidx.compose.ui:ui-tooling", version.ref =
compose-ui-utils = { module = "androidx.compose.ui:ui-util", version.ref = "compose-runtime" }
compose-animation = { module = "androidx.compose.animation:animation", version.ref = "compose-runtime" }
compose-foundation = { module = "androidx.compose.foundation:foundation", version.ref = "compose-foundation" }
compose-material = { module = "androidx.compose.material:material", version.ref = "compose-material" }
compose-material3 = { module = "androidx.compose.material3:material3", version.ref = "compose-material3" }
compose-constraintLayout = { module = "androidx.constraintlayout:constraintlayout-compose", version.ref = "compose-constraint" }
compose-shimmer = { module = "com.valentinilk.shimmer:compose-shimmer", version.ref = "compose-shimmer" }