Bug 1179479 - Set the 3-dot menu MenuItemActionBar colors. r=mhaigh, a=sledru
authorMichael Comella <michael.l.comella@gmail.com>
Wed, 05 Aug 2015 15:38:57 -0700
changeset 288788 33c0b0175e5fd925f3c7e6a28de0753958e72d25
parent 288787 7c092142102fac5312234bfc9beea307f6910cca
child 288789 06da1c87b289768ccf0d6d59feea8c07989f8f71
push id5067
push userraliiev@mozilla.com
push dateMon, 21 Sep 2015 14:04:52 +0000
treeherdermozilla-beta@14221ffe5b2f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh, sledru
bugs1179479
milestone42.0a2
Bug 1179479 - Set the 3-dot menu MenuItemActionBar colors. r=mhaigh, a=sledru The tint for disabled icons broke when I made setEnabled no longer use a colorFilter to change the color of a disabled view.
mobile/android/base/resources/color-large-v11/action_bar_secondary_menu_item_colors.xml
mobile/android/base/resources/values-large-v11/styles.xml
mobile/android/base/resources/values/styles.xml
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/color-large-v11/action_bar_secondary_menu_item_colors.xml
@@ -0,0 +1,15 @@
+<?xml version="1.0" encoding="utf-8"?>
+<!-- This Source Code Form is subject to the terms of the Mozilla Public
+   - 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"
+          xmlns:gecko="http://schemas.android.com/apk/res-auto">
+
+    <item android:state_enabled="false"
+          android:color="@color/disabled_grey"
+          />
+
+    <item android:color="@color/toolbar_icon_grey" />
+
+</selector>
--- a/mobile/android/base/resources/values-large-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-v11/styles.xml
@@ -88,16 +88,20 @@
                  * The bookmarks star is larger than the reload button
                  * The reload button contains whitespace at the top of the image to lower it -->
         <item name="android:paddingTop">19dp</item>
         <item name="android:paddingBottom">21dp</item>
         <item name="android:paddingLeft">@dimen/new_tablet_browser_toolbar_menu_item_padding_horizontal</item>
         <item name="android:paddingRight">@dimen/new_tablet_browser_toolbar_menu_item_padding_horizontal</item>
     </style>
 
+    <style name="Widget.MenuItemSecondaryActionBar" parent="Widget.MenuItemSecondaryActionBarBase">
+        <item name="drawableTintList">@color/action_bar_secondary_menu_item_colors</item>
+    </style>
+
     <style name="Widget.BookmarksListView" parent="Widget.HomeListView">
         <item name="android:scrollbarStyle">outsideOverlay</item>
     </style>
 
     <style name="Widget.TopSitesGridView" parent="Widget.GridView">
         <item name="android:paddingLeft">5dp</item>
         <item name="android:paddingRight">5dp</item>
         <item name="android:paddingBottom">30dp</item>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -85,21 +85,24 @@
     </style>
 
     <style name="Widget.MenuItemActionBar">
         <item name="android:padding">8dip</item>
         <item name="android:background">@drawable/action_bar_button</item>
         <item name="android:scaleType">fitCenter</item>
     </style>
 
-    <style name="Widget.MenuItemSecondaryActionBar">
+    <style name="Widget.MenuItemSecondaryActionBarBase">
         <item name="android:padding">8dip</item>
         <item name="android:background">@drawable/action_bar_button</item>
         <item name="android:scaleType">centerInside</item>
-        <item name="drawableTintList">@color/secondary_menu_item_colors</item>
+    </style>
+
+    <style name="Widget.MenuItemSecondaryActionBar" parent="Widget.MenuItemSecondaryActionBarBase">
+        <!-- Overridden in large config -->
     </style>
 
     <style name="Widget.MenuItemActionView">
         <item name="android:gravity">left</item>
     </style>
 
     <style name="Widget.MenuItemDefault">
         <item name="android:paddingLeft">10dip</item>