From 5bea4554ad0245bd986b20fe229501a5828915f1 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Thu, 23 Dec 2021 13:12:09 -0500 Subject: [PATCH] For #22965 - Add Form Selected design color token --- app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt | 8 ++++++++ app/src/main/res/values-night/colors.xml | 2 ++ app/src/main/res/values/colors.xml | 2 ++ 3 files changed, 12 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 d60d2e9655..0e698e2d9c 100644 --- a/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt +++ b/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt @@ -54,6 +54,7 @@ private val darkColorPalette = FirefoxColors( actionPrimary = PhotonColors.Violet60, actionSecondary = PhotonColors.DarkGrey50, formDefault = PhotonColors.LightGrey05, + formSelected = PhotonColors.Violet40, actionDisabled = PhotonColors.DarkGrey05, control = PhotonColors.DarkGrey05, controlDark = PhotonColors.Violet40A30, @@ -100,6 +101,7 @@ private val lightColorPalette = FirefoxColors( actionPrimary = PhotonColors.Violet90, actionSecondary = PhotonColors.LightGrey40, formDefault = PhotonColors.DarkGrey90, + formSelected = PhotonColors.Violet90, actionDisabled = PhotonColors.LightGrey50, control = PhotonColors.LightGrey30, controlDark = PhotonColors.Violet40A30, @@ -151,6 +153,7 @@ class FirefoxColors( actionPrimary: Color, actionSecondary: Color, formDefault: Color, + formSelected: Color, actionDisabled: Color, control: Color, controlDark: Color, @@ -223,6 +226,9 @@ class FirefoxColors( // Checkbox default, Radio button default var formDefault by mutableStateOf(formDefault) private set + // Checkbox selected, Radio button selected + var formSelected by mutableStateOf(formSelected) + private set // Checkbox disabled, Radio disabled var actionDisabled by mutableStateOf(actionDisabled) private set @@ -330,6 +336,7 @@ class FirefoxColors( actionPrimary = other.actionPrimary actionSecondary = other.actionSecondary formDefault = other.formDefault + formSelected = other.formSelected actionDisabled = other.actionDisabled control = other.control controlDark = other.controlDark @@ -376,6 +383,7 @@ class FirefoxColors( actionPrimary = actionPrimary, actionSecondary = actionSecondary, formDefault = formDefault, + formSelected = formSelected, actionDisabled = actionDisabled, control = control, controlDark = controlDark, diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 053f72aec3..a041894c8a 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -31,6 +31,8 @@ @color/photonDarkGrey50 @color/photonLightGrey05 + + @color/photonViolet40 @color/photonDarkGrey05 diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 63e5186558..dce216c1ab 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -31,6 +31,8 @@ @color/photonLightGrey40 @color/photonDarkGrey90 + + @color/photonViolet90 @color/photonLightGrey50