1
0
Fork 0

For #3087 - Adds disabled color attr (#3192)

* For #3087 - Adds disabled color attr

* Change alpha to 40%
master
Emily Kager 2019-06-05 18:37:16 -07:00 committed by Colin Lee
parent 93a5456785
commit 9624964bc3
7 changed files with 13 additions and 5 deletions

View File

@ -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

View File

@ -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

View File

@ -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/. -->
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:state_enabled="false" android:color="@color/disabled_text" />
<item android:state_enabled="false" android:color="?disabled" />
<item android:color="?primaryText"/>
</selector>

View File

@ -17,6 +17,7 @@
<color name="neutral_faded_normal_theme">@color/neutral_faded_dark_theme</color>
<color name="shadow_normal_theme">@color/shadow_dark_theme</color>
<color name="destructive_normal_theme">@color/destructive_dark_theme</color>
<color name="disabled_normal_theme">@color/disabled_dark_theme</color>
<color name="scrimStart_normal_theme">@color/scrimStart_dark_theme</color>
<color name="scrimEnd_normal_theme">@color/scrimEnd_dark_theme</color>
<color name="toggle_off_knob_normal_theme">@color/toggle_off_knob_dark_theme</color>

View File

@ -17,6 +17,7 @@
<attr name="neutralFaded" format="reference" />
<attr name="shadow" format="reference" />
<attr name="destructive" format="reference"/>
<attr name="disabled" format="reference" />
<attr name="scrimStart" format="reference"/>
<attr name="scrimEnd" format="reference"/>

View File

@ -17,6 +17,7 @@
<color name="neutral_faded_light_theme">@color/photonGrey20</color>
<color name="shadow_light_theme">#1F000000</color>
<color name="destructive_light_theme">#C50042</color>
<color name="disabled_light_theme">#6620123A</color>
<color name="scrimStart_light_theme">#F515141A</color>
<color name="scrimEnd_light_theme">#F542414D</color>
@ -34,6 +35,7 @@
<color name="neutral_faded_dark_theme">#1FEDEDF0</color>
<color name="shadow_dark_theme">#050505</color>
<color name="destructive_dark_theme">#FF6A75</color>
<color name="disabled_dark_theme">#66FBFBFE</color>
<color name="scrimStart_dark_theme">#F520123A</color>
<color name="scrimEnd_dark_theme">#F515141A</color>
@ -51,6 +53,7 @@
<color name="neutral_faded_private_theme">#1FEDEDF0</color>
<color name="shadow_private_theme">#2B1067</color>
<color name="destructive_private_theme">#FF6A75</color>
<color name="disabled_private_theme">#66FBFBFE</color>
<color name="scrimStart_private_theme">#F520123A</color>
<color name="scrimEnd_private_theme">#F515141A</color>
@ -68,6 +71,7 @@
<color name="neutral_faded_normal_theme">@color/neutral_faded_light_theme</color>
<color name="shadow_normal_theme">@color/shadow_light_theme</color>
<color name="destructive_normal_theme">@color/destructive_light_theme</color>
<color name="disabled_normal_theme">@color/disabled_light_theme</color>
<color name="scrimStart_normal_theme">@color/scrimStart_light_theme</color>
<color name="scrimEnd_normal_theme">@color/scrimEnd_light_theme</color>

View File

@ -39,6 +39,7 @@
<item name="neutralFaded">@color/neutral_faded_normal_theme</item>
<item name="shadow">@color/shadow_normal_theme</item>
<item name="destructive">@color/destructive_normal_theme</item>
<item name="disabled">@color/disabled_normal_theme</item>
<item name="scrimStart">@color/scrimStart_normal_theme</item>
<item name="scrimEnd">@color/scrimEnd_normal_theme</item>
@ -111,6 +112,7 @@
<item name="neutralFaded">@color/neutral_faded_private_theme</item>
<item name="shadow">@color/shadow_private_theme</item>
<item name="destructive">@color/destructive_private_theme</item>
<item name="disabled">@color/disabled_private_theme</item>
<item name="scrimStart">@color/scrimStart_private_theme</item>
<item name="scrimEnd">@color/scrimEnd_private_theme</item>