From 79f7c017d2842189d7e9f1972e52f77a1195699c Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Fri, 4 Mar 2022 12:48:51 -0500 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/24102 - Add Layer Accent Opaque design token --- .../app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt | 10 ++++++++++ mobile/android/fenix/app/src/main/res/values-night/colors.xml | 2 ++ mobile/android/fenix/app/src/main/res/values/colors.xml | 4 ++++ 3 files changed, 16 insertions(+) diff --git a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt index 3b0e1bf77618..d494620b3e89 100644 --- a/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt +++ b/mobile/android/fenix/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt @@ -2,6 +2,8 @@ * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ +@file:Suppress("MagicNumber") + package org.mozilla.fenix.theme import androidx.compose.foundation.isSystemInDarkTheme @@ -46,6 +48,7 @@ private val darkColorPalette = FirefoxColors( layer3 = PhotonColors.DarkGrey30, layerAccent = PhotonColors.Violet40, layerAccentNonOpaque = PhotonColors.Violet50A32, + layerAccentOpaque = Color(0xFF423262), scrim = PhotonColors.DarkGrey90A95, gradientStart = PhotonColors.Violet70, gradientEnd = PhotonColors.Violet40, @@ -105,6 +108,7 @@ private val lightColorPalette = FirefoxColors( layer3 = PhotonColors.LightGrey20, layerAccent = PhotonColors.Ink20, layerAccentNonOpaque = PhotonColors.Violet70A12, + layerAccentOpaque = Color(0xFFEAE4F9), scrim = PhotonColors.DarkGrey30A95, gradientStart = PhotonColors.Violet70, gradientEnd = PhotonColors.Violet40, @@ -169,6 +173,7 @@ class FirefoxColors( layer3: Color, layerAccent: Color, layerAccentNonOpaque: Color, + layerAccentOpaque: Color, scrim: Color, gradientStart: Color, gradientEnd: Color, @@ -238,6 +243,9 @@ class FirefoxColors( // Selected tab var layerAccentNonOpaque by mutableStateOf(layerAccentNonOpaque) private set + // Selected tab + var layerAccentOpaque by mutableStateOf(layerAccentOpaque) + private set var scrim by mutableStateOf(scrim) private set // Tooltip @@ -403,6 +411,7 @@ class FirefoxColors( layer3 = other.layer3 layerAccent = other.layerAccent layerAccentNonOpaque = other.layerAccentNonOpaque + layerAccentOpaque = other.layerAccentOpaque scrim = other.scrim gradientStart = other.gradientStart gradientEnd = other.gradientEnd @@ -462,6 +471,7 @@ class FirefoxColors( layer3 = layer3, layerAccent = layerAccent, layerAccentNonOpaque = layerAccentNonOpaque, + layerAccentOpaque = layerAccentOpaque, scrim = scrim, gradientStart = gradientStart, gradientEnd = gradientEnd, diff --git a/mobile/android/fenix/app/src/main/res/values-night/colors.xml b/mobile/android/fenix/app/src/main/res/values-night/colors.xml index d28e3155450b..dc4d7b9a7f8e 100644 --- a/mobile/android/fenix/app/src/main/res/values-night/colors.xml +++ b/mobile/android/fenix/app/src/main/res/values-night/colors.xml @@ -16,6 +16,8 @@ @color/photonViolet40 @color/photonViolet50A32 + + #423262 @color/photonDarkGrey90A95 @color/photonViolet70 diff --git a/mobile/android/fenix/app/src/main/res/values/colors.xml b/mobile/android/fenix/app/src/main/res/values/colors.xml index 224d562e2f43..d95d06e989cc 100644 --- a/mobile/android/fenix/app/src/main/res/values/colors.xml +++ b/mobile/android/fenix/app/src/main/res/values/colors.xml @@ -16,6 +16,8 @@ @color/photonInk20 @color/photonViolet70A12 + + #EAE4F9 @color/photonDarkGrey30A95 @color/photonViolet70 @@ -139,6 +141,8 @@ @color/photonViolet40 @color/photonViolet50A32 + + #423262 @color/photonDarkGrey90A95 @color/photonViolet70 -- 2.11.4.GIT