From 46e5afb0af46a3a59878e5064417ec23efaa65e2 Mon Sep 17 00:00:00 2001 From: Emily Kager Date: Wed, 5 Jun 2019 18:37:16 -0700 Subject: [PATCH] [fenix] For https://github.com/mozilla-mobile/fenix/issues/3087 - Adds disabled color attr (https://github.com/mozilla-mobile/fenix/pull/3192) * For https://github.com/mozilla-mobile/fenix/issues/3087 - Adds disabled color attr * Change alpha to 40% --- .../mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt | 4 ++-- .../java/org/mozilla/fenix/customtabs/CustomTabToolbarMenu.kt | 4 ++-- app/src/main/res/color/state_list_text_color.xml | 2 +- app/src/main/res/values-night/colors.xml | 1 + app/src/main/res/values/attrs.xml | 1 + app/src/main/res/values/colors.xml | 4 ++++ app/src/main/res/values/styles.xml | 2 ++ 7 files changed, 13 insertions(+), 5 deletions(-) diff --git a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt index 4cb7f99e3b..06721d827d 100644 --- a/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/components/toolbar/DefaultToolbarMenu.kt @@ -38,7 +38,7 @@ class DefaultToolbarMenu( context.components.core.sessionManager.selectedSession?.canGoBack ?: true }, secondaryImageTintResource = ThemeManager.resolveAttribute( - R.attr.neutral, + R.attr.disabled, context ), disableInSecondaryState = true @@ -57,7 +57,7 @@ class DefaultToolbarMenu( context.components.core.sessionManager.selectedSession?.canGoForward ?: true }, secondaryImageTintResource = ThemeManager.resolveAttribute( - R.attr.neutral, + R.attr.disabled, context ), disableInSecondaryState = true diff --git a/app/src/main/java/org/mozilla/fenix/customtabs/CustomTabToolbarMenu.kt b/app/src/main/java/org/mozilla/fenix/customtabs/CustomTabToolbarMenu.kt index da2260bd89..9115f39acf 100644 --- a/app/src/main/java/org/mozilla/fenix/customtabs/CustomTabToolbarMenu.kt +++ b/app/src/main/java/org/mozilla/fenix/customtabs/CustomTabToolbarMenu.kt @@ -39,7 +39,7 @@ class CustomTabToolbarMenu( session?.canGoBack ?: true }, secondaryImageTintResource = ThemeManager.resolveAttribute( - R.attr.neutral, + R.attr.disabled, context ), disableInSecondaryState = true @@ -58,7 +58,7 @@ class CustomTabToolbarMenu( session?.canGoForward ?: true }, secondaryImageTintResource = ThemeManager.resolveAttribute( - R.attr.neutral, + R.attr.disabled, context ), disableInSecondaryState = true diff --git a/app/src/main/res/color/state_list_text_color.xml b/app/src/main/res/color/state_list_text_color.xml index 4b29becb11..68658629a1 100644 --- a/app/src/main/res/color/state_list_text_color.xml +++ b/app/src/main/res/color/state_list_text_color.xml @@ -3,6 +3,6 @@ - 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/. --> - + diff --git a/app/src/main/res/values-night/colors.xml b/app/src/main/res/values-night/colors.xml index b711506ec3..423802a6f4 100644 --- a/app/src/main/res/values-night/colors.xml +++ b/app/src/main/res/values-night/colors.xml @@ -17,6 +17,7 @@ @color/neutral_faded_dark_theme @color/shadow_dark_theme @color/destructive_dark_theme + @color/disabled_dark_theme @color/scrimStart_dark_theme @color/scrimEnd_dark_theme @color/toggle_off_knob_dark_theme diff --git a/app/src/main/res/values/attrs.xml b/app/src/main/res/values/attrs.xml index 80155cbd76..43fb134feb 100644 --- a/app/src/main/res/values/attrs.xml +++ b/app/src/main/res/values/attrs.xml @@ -17,6 +17,7 @@ + diff --git a/app/src/main/res/values/colors.xml b/app/src/main/res/values/colors.xml index d1a2865e55..ac504faccf 100644 --- a/app/src/main/res/values/colors.xml +++ b/app/src/main/res/values/colors.xml @@ -17,6 +17,7 @@ @color/photonGrey20 #1F000000 #C50042 + #6620123A #F515141A #F542414D @@ -34,6 +35,7 @@ #1FEDEDF0 #050505 #FF6A75 + #66FBFBFE #F520123A #F515141A @@ -51,6 +53,7 @@ #1FEDEDF0 #2B1067 #FF6A75 + #66FBFBFE #F520123A #F515141A @@ -68,6 +71,7 @@ @color/neutral_faded_light_theme @color/shadow_light_theme @color/destructive_light_theme + @color/disabled_light_theme @color/scrimStart_light_theme @color/scrimEnd_light_theme diff --git a/app/src/main/res/values/styles.xml b/app/src/main/res/values/styles.xml index ee105bf083..fda43f7927 100644 --- a/app/src/main/res/values/styles.xml +++ b/app/src/main/res/values/styles.xml @@ -39,6 +39,7 @@ @color/neutral_faded_normal_theme @color/shadow_normal_theme @color/destructive_normal_theme + @color/disabled_normal_theme @color/scrimStart_normal_theme @color/scrimEnd_normal_theme @@ -111,6 +112,7 @@ @color/neutral_faded_private_theme @color/shadow_private_theme @color/destructive_private_theme + @color/disabled_private_theme @color/scrimStart_private_theme @color/scrimEnd_private_theme