From 0a558bf3bb3d94c9dc32828636ded59e310d3d31 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Thu, 23 Dec 2021 14:32:48 -0500 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/22965 - Add Form On, Form Off, Indicator Active, Indicator Inactive color tokens --- .../org/mozilla/fenix/theme/FirefoxTheme.kt | 32 +++++++++++++++++++ app/src/main/res/values-night/colors.xml | 8 +++++ app/src/main/res/values/colors.xml | 8 +++++ 3 files changed, 48 insertions(+) diff --git a/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt b/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt index b0214b53b5..8c06ff1531 100644 --- a/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt +++ b/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt @@ -57,6 +57,10 @@ private val darkColorPalette = FirefoxColors( formSelected = PhotonColors.Violet40, formSurface = PhotonColors.DarkGrey05, formDisabled = PhotonColors.DarkGrey05, + formOn = PhotonColors.Violet40, + formOff = PhotonColors.LightGrey05, + indicatorActive = PhotonColors.LightGrey90, + indicatorInactive = PhotonColors.DarkGrey05, textPrimary = PhotonColors.LightGrey05, textSecondary = PhotonColors.LightGrey40, textDisabled = PhotonColors.LightGrey05A40, @@ -102,6 +106,10 @@ private val lightColorPalette = FirefoxColors( formSelected = PhotonColors.Violet90, formSurface = PhotonColors.LightGrey50, formDisabled = PhotonColors.LightGrey50, + formOn = PhotonColors.Violet90, + formOff = PhotonColors.LightGrey05, + indicatorActive = PhotonColors.LightGrey50, + indicatorInactive = PhotonColors.LightGrey30, textPrimary = PhotonColors.DarkGrey90, textSecondary = PhotonColors.DarkGrey05, textDisabled = PhotonColors.DarkGrey90A40, @@ -152,6 +160,10 @@ class FirefoxColors( formSelected: Color, formSurface: Color, formDisabled: Color, + formOn: Color, + formOff: Color, + indicatorActive: Color, + indicatorInactive: Color, textPrimary: Color, textSecondary: Color, textDisabled: Color, @@ -229,6 +241,18 @@ class FirefoxColors( // Checkbox disabled, Radio disabled var formDisabled by mutableStateOf(formDisabled) private set + // Switch thumb ON + var formOn by mutableStateOf(formOn) + private set + // Switch thumb OFF + var formOff by mutableStateOf(formOff) + private set + // Scroll indicator active + var indicatorActive by mutableStateOf(indicatorActive) + private set + // Scroll indicator inactive + var indicatorInactive by mutableStateOf(indicatorInactive) + private set // Text @@ -327,6 +351,10 @@ class FirefoxColors( formSelected = other.formSelected formSurface = other.formSurface formDisabled = other.formDisabled + formOn = other.formOn + formOff = other.formOff + indicatorActive = other.indicatorActive + indicatorInactive = other.indicatorInactive textPrimary = other.textPrimary textSecondary = other.textSecondary textDisabled = other.textDisabled @@ -372,6 +400,10 @@ class FirefoxColors( formSelected = formSelected, formSurface = formSurface, formDisabled = formDisabled, + formOn = formOn, + formOff = formOff, + indicatorActive = indicatorActive, + indicatorInactive = indicatorInactive, textPrimary = textPrimary, textSecondary = textSecondary, textDisabled = textDisabled, diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index e8d3b761e3..cb898b8513 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -37,6 +37,14 @@ @color/photonDarkGrey05 @color/photonDarkGrey05 + + @color/photonViolet40 + + @color/photonLightGrey05 + + @color/photonLightGrey90 + + @color/photonDarkGrey05 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 5f949d9ed2..15bf351d09 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -37,6 +37,14 @@ @color/photonLightGrey50 @color/photonLightGrey50 + + @color/photonViolet90 + + @color/photonLightGrey05 + + @color/photonLightGrey50 + + @color/photonLightGrey30