From bf1edf6c1b030d415beb80b74682b7b3e1b30b0f Mon Sep 17 00:00:00 2001 From: Algirdas Pundzius Date: Fri, 21 Jul 2023 11:32:22 +0300 Subject: [PATCH] fix(presentation-compose): Fix Material 3 coloring as incorrect scrim was used as default. --- ...yDialogSnapshotTest_accountRecoveryInvalidPasswordTest.png | 4 ++-- .../src/main/kotlin/me/proton/core/compose/theme/Colors.kt | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/account-recovery/presentation-compose/src/test/snapshots/images/me.proton.core.accountrecovery.presentation.compose_AccountRecoveryDialogSnapshotTest_accountRecoveryInvalidPasswordTest.png b/account-recovery/presentation-compose/src/test/snapshots/images/me.proton.core.accountrecovery.presentation.compose_AccountRecoveryDialogSnapshotTest_accountRecoveryInvalidPasswordTest.png index a33fa603e..11ef444ca 100644 --- a/account-recovery/presentation-compose/src/test/snapshots/images/me.proton.core.accountrecovery.presentation.compose_AccountRecoveryDialogSnapshotTest_accountRecoveryInvalidPasswordTest.png +++ b/account-recovery/presentation-compose/src/test/snapshots/images/me.proton.core.accountrecovery.presentation.compose_AccountRecoveryDialogSnapshotTest_accountRecoveryInvalidPasswordTest.png @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:6644a1aed7f8eb73fb2fcf9178e5483bfbd30151e4401b9aff0a52e667237831 -size 32127 +oid sha256:4b89030dae9638d21e4eb8972816f32631776f8e409bb6c6908f4d6b5732de46 +size 31998 diff --git a/presentation-compose/src/main/kotlin/me/proton/core/compose/theme/Colors.kt b/presentation-compose/src/main/kotlin/me/proton/core/compose/theme/Colors.kt index 0e7ff664a..58c73d53d 100644 --- a/presentation-compose/src/main/kotlin/me/proton/core/compose/theme/Colors.kt +++ b/presentation-compose/src/main/kotlin/me/proton/core/compose/theme/Colors.kt @@ -618,7 +618,7 @@ internal fun ProtonColors.toMaterial3ThemeColors() = androidx.compose.material3. onTertiaryContainer = textNorm, background = backgroundNorm, onBackground = textNorm, - surface = backgroundSecondary, + surface = backgroundNorm, onSurface = textNorm, surfaceVariant = backgroundNorm, onSurfaceVariant = textNorm, @@ -631,7 +631,7 @@ internal fun ProtonColors.toMaterial3ThemeColors() = androidx.compose.material3. outline = brandNorm, surfaceTint = Color.Unspecified, outlineVariant = brandNorm, - scrim = brandDarken40 + scrim = blenderNorm ) internal fun ProtonColors.toMaterialThemeColors() = Colors(