From 1d3e76f885d30381a9df60146954f73ff81bcf46 Mon Sep 17 00:00:00 2001 From: Gabriel Luong Date: Thu, 6 Jan 2022 19:51:09 -0500 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/23086 - Update Border Divider to Border Default --- .../home/recentvisits/view/RecentlyVisited.kt | 2 +- .../org/mozilla/fenix/theme/FirefoxTheme.kt | 23 ++++++++++--------- app/src/main/res/values-night/colors.xml | 3 ++- app/src/main/res/values/colors.xml | 3 ++- 4 files changed, 17 insertions(+), 14 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/home/recentvisits/view/RecentlyVisited.kt b/app/src/main/java/org/mozilla/fenix/home/recentvisits/view/RecentlyVisited.kt index c4461ed6d3..bc31209f3b 100644 --- a/app/src/main/java/org/mozilla/fenix/home/recentvisits/view/RecentlyVisited.kt +++ b/app/src/main/java/org/mozilla/fenix/home/recentvisits/view/RecentlyVisited.kt @@ -343,7 +343,7 @@ private fun RecentlyVisitedDivider( ) { Divider( modifier = modifier, - color = FirefoxTheme.colors.borderDivider, + color = FirefoxTheme.colors.borderDefault, thickness = 0.5.dp ) } 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 582aa7873a..56e05066e8 100644 --- a/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt +++ b/app/src/main/java/org/mozilla/fenix/theme/FirefoxTheme.kt @@ -81,11 +81,11 @@ private val darkColorPalette = FirefoxColors( iconAccentYellow = PhotonColors.Yellow20, iconGradientStart = PhotonColors.Violet20, iconGradientEnd = PhotonColors.Blue20, + borderDefault = PhotonColors.DarkGrey05, borderFormDefault = PhotonColors.LightGrey05, borderSelected = PhotonColors.Violet40, borderDisabled = PhotonColors.LightGrey70, - borderWarning = PhotonColors.Red40, - borderDivider = PhotonColors.DarkGrey05 + borderWarning = PhotonColors.Red40 ) private val lightColorPalette = FirefoxColors( @@ -129,11 +129,11 @@ private val lightColorPalette = FirefoxColors( iconAccentYellow = PhotonColors.Yellow60, iconGradientStart = PhotonColors.Violet50, iconGradientEnd = PhotonColors.Blue60, + borderDefault = PhotonColors.LightGrey30, borderFormDefault = PhotonColors.DarkGrey90, borderSelected = PhotonColors.Ink20, borderDisabled = PhotonColors.LightGrey70, - borderWarning = PhotonColors.Red80, - borderDivider = PhotonColors.LightGrey40, + borderWarning = PhotonColors.Red80 ) /** @@ -182,11 +182,11 @@ class FirefoxColors( iconAccentYellow: Color, iconGradientStart: Color, iconGradientEnd: Color, + borderDefault: Color, borderFormDefault: Color, borderSelected: Color, borderDisabled: Color, - borderWarning: Color, - borderDivider: Color + borderWarning: Color ) { // Layers @@ -313,6 +313,9 @@ class FirefoxColors( // Border + // Default, Divider, Dotted + var borderDefault by mutableStateOf(borderDefault) + private set // Form parts var borderFormDefault by mutableStateOf(borderFormDefault) private set @@ -325,8 +328,6 @@ class FirefoxColors( // Form parts var borderWarning by mutableStateOf(borderWarning) private set - var borderDivider by mutableStateOf(borderDivider) - private set fun update(other: FirefoxColors) { layer1 = other.layer1 @@ -369,11 +370,11 @@ class FirefoxColors( iconAccentYellow = other.iconAccentYellow iconGradientStart = other.iconGradientStart iconGradientEnd = other.iconGradientEnd + borderDefault = other.borderDefault borderFormDefault = other.borderFormDefault borderSelected = other.borderSelected borderDisabled = other.borderDisabled borderWarning = other.borderWarning - borderDivider = other.borderDivider } fun copy(): FirefoxColors = FirefoxColors( @@ -417,11 +418,11 @@ class FirefoxColors( iconAccentYellow = iconAccentYellow, iconGradientStart = iconGradientStart, iconGradientEnd = iconGradientEnd, + borderDefault = borderDefault, borderFormDefault = borderFormDefault, borderSelected = borderSelected, borderDisabled = borderDisabled, - borderWarning = borderWarning, - borderDivider = borderDivider + borderWarning = borderWarning ) } diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index 3451312064..cef47c39cc 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -85,6 +85,8 @@ @color/photonBlue20 + + @color/photonDarkGrey05 @color/photonLightGrey05 @@ -93,7 +95,6 @@ @color/photonLightGrey70 @color/photonRed40 - @color/photonDarkGrey05 @color/fx_mobile_text_color_primary diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index 8cb2c36a0b..83aea24c90 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -85,6 +85,8 @@ @color/photonBlue60 + + @color/photonLightGrey30 @color/photonDarkGrey90 @@ -93,7 +95,6 @@ @color/photonLightGrey70 @color/photonRed80 - @color/photonLightGrey40