Bug 1055536 - Consolidate divider colors (r=margaret)
authorLucas Rocha <lucasr@mozilla.com>
Tue, 02 Sep 2014 16:07:44 +0100
changeset 202953 e18ff990cb6de9319f2c9778ea985367f25ced11
parent 202952 d4527b684366beefa86d6778acfee98148c56c68
child 202954 e74b08895ef7ff1dc5a3557e3acdf643778916e4
child 202960 bfeddb24df7e63c5aa359d2d14207de4edb8182f
push id8491
push userlrocha@mozilla.com
push dateTue, 02 Sep 2014 15:08:27 +0000
treeherderfx-team@e18ff990cb6d [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1055536
milestone34.0a1
Bug 1055536 - Consolidate divider colors (r=margaret)
mobile/android/base/resources/drawable/divider_horizontal.xml
mobile/android/base/resources/drawable/divider_vertical.xml
mobile/android/base/resources/drawable/home_panel_title_background.xml
mobile/android/base/resources/values-v11/styles.xml
mobile/android/base/resources/values/colors.xml
mobile/android/base/resources/values/styles.xml
mobile/android/base/widget/DoorHanger.java
--- a/mobile/android/base/resources/drawable/divider_horizontal.xml
+++ b/mobile/android/base/resources/drawable/divider_horizontal.xml
@@ -1,12 +1,12 @@
 <?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/. -->
 
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
 
-    <solid android:color="#D7D9DB"/>
+    <solid android:color="@color/divider_light"/>
     <size android:height="1dp" />
 
 </shape>
--- a/mobile/android/base/resources/drawable/divider_vertical.xml
+++ b/mobile/android/base/resources/drawable/divider_vertical.xml
@@ -1,12 +1,12 @@
 <?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/. -->
 
 <shape xmlns:android="http://schemas.android.com/apk/res/android"
        android:shape="rectangle">
 
-    <solid android:color="#D7D9DB"/>
+    <solid android:color="@color/divider_light"/>
     <size android:width="1dp" />
 
 </shape>
--- a/mobile/android/base/resources/drawable/home_panel_title_background.xml
+++ b/mobile/android/base/resources/drawable/home_panel_title_background.xml
@@ -1,15 +1,15 @@
 <?xml version="1.0" encoding="utf-8"?>
 <layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
     <item android:left="-1dp"
           android:right="-1dp"
           android:top="-1dp">
 
         <shape android:shape="rectangle" >
             <stroke android:width="1px"
-                    android:color="@color/doorhanger_divider_light" />
+                    android:color="@color/divider_light" />
 
             <solid android:color="#00000000" />
         </shape>
     </item>
 
 </layer-list>
--- a/mobile/android/base/resources/values-v11/styles.xml
+++ b/mobile/android/base/resources/values-v11/styles.xml
@@ -54,17 +54,17 @@
     <!-- TabsTray ActionBar -->
     <style name="ActionBar.TabsTray">
          <item name="android:visibility">gone</item>
     </style>
 
     <!-- DropDown List View -->
     <style name="DropDownListView" parent="@android:style/Widget.Holo.ListView.DropDown">
          <item name="android:listSelector">@drawable/action_bar_button</item>
-         <item name="android:divider">#FFD7D9DB</item>
+         <item name="android:divider">@color/divider_light</item>
          <item name="android:dividerHeight">1dp</item>
     </style>
 
     <!-- Spinner DropDown Item -->
     <style name="Widget.DropDownItem.Spinner" parent="@android:style/Widget.Holo.Light.DropDownItem.Spinner">
          <item name="android:textColor">#FF000000</item>
     </style>
 
--- a/mobile/android/base/resources/values/colors.xml
+++ b/mobile/android/base/resources/values/colors.xml
@@ -64,25 +64,27 @@
 
   <!-- Highlight colors -->
   <color name="text_color_highlight">#FF9500</color>
   <color name="text_color_highlight_inverse">#D06BFF</color>
 
   <!-- Link colors -->
   <color name="text_color_link">#22629E</color>
 
+  <!-- Divider colors -->
+  <color name="divider_light">#FFD7D9DB</color>
+  <color name="divider_dark">#FFB3C2CE</color>
+
   <color name="splash_background">#000000</color>
   <color name="splash_msgfont">#ffffff</color>
   <color name="splash_urlfont">#000000</color>
   <color name="splash_content">#ffffff</color>
 
   <color name="doorhanger_text">#FF222222</color>
   <color name="doorhanger_link">#FF2AA1FE</color>
-  <color name="doorhanger_divider_light">#FFD7D9DB</color>
-  <color name="doorhanger_divider_dark">#FFB3C2CE</color>
   <color name="doorhanger_background_dark">#FFDDE4EA</color>
 
   <color name="validation_message_text">#ffffff</color>
   <color name="url_bar_text_highlight">#FFFF9500</color>
   <color name="url_bar_text_highlight_pb">#FFD06BFF</color>
   <color name="suggestion_primary">#dddddd</color>
   <color name="suggestion_pressed">#bbbbbb</color>
   <color name="tab_row_pressed">#4D000000</color>
@@ -115,11 +117,10 @@
   <!-- Remote tabs setup -->
   <color name="remote_tabs_setup_button_background">#E66000</color>
   <color name="remote_tabs_setup_button_background_hit">#D95300</color>
 
   <!-- Button toast colors. -->
   <color name="toast_background">#DD363B40</color>
   <color name="toast_button_background">#00000000</color>
   <color name="toast_button_pressed">#DD2C3136</color>
-  <color name="toast_button_divider">#FFD7D9DB</color>
   <color name="toast_button_text">#FFFFFFFF</color>
 </resources>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -40,17 +40,17 @@
         <item name="android:textAppearance">@style/TextAppearance.Widget.EditText</item>
     </style>
 
     <style name="Widget.TextView" parent="Widget.BaseTextView">
         <item name="android:textAppearance">@style/TextAppearance.Widget.TextView</item>
     </style>
 
     <style name="Widget.ListView" parent="Widget.BaseListView">
-        <item name="android:divider">#D7D9DB</item>
+        <item name="android:divider">@color/divider_light</item>
         <item name="android:dividerHeight">1dp</item>
         <item name="android:cacheColorHint">@android:color/transparent</item>
         <item name="android:listSelector">@drawable/action_bar_button</item>
     </style>
 
     <style name="Widget.ExpandableListView" parent="Widget.ListView">
         <item name="android:groupIndicator">@android:color/transparent</item>
     </style>
@@ -681,17 +681,17 @@
         <item name="android:background">@null</item>
         <item name="android:paddingLeft">12dp</item>
         <item name="android:paddingRight">12dp</item>
         <item name="android:paddingTop">11dp</item>
         <item name="android:paddingBottom">11dp</item>
     </style>
 
     <style name="ToastDividerBase">
-        <item name="android:background">@color/toast_button_divider</item>
+        <item name="android:background">@color/divider_light</item>
         <item name="android:layout_width">1dp</item>
         <item name="android:layout_height">match_parent</item>
     </style>
 
     <style name="ToastMessageBase" parent="ToastElementBase">
         <item name="android:textColor">@color/toast_button_text</item>
         <item name="android:layout_width">0dp</item>
         <item name="android:layout_weight">1</item>
--- a/mobile/android/base/widget/DoorHanger.java
+++ b/mobile/android/base/widget/DoorHanger.java
@@ -116,20 +116,20 @@ public class DoorHanger extends LinearLa
 
         setTheme(theme);
     }
 
     private void setTheme(Theme theme) {
         if (theme == Theme.LIGHT) {
             // The default styles declared in doorhanger.xml are light-themed, so we just
             // need to set the divider color that we'll use in addButton.
-            mDividerColor = mResources.getColor(R.color.doorhanger_divider_light);
+            mDividerColor = mResources.getColor(R.color.divider_light);
 
         } else if (theme == Theme.DARK) {
-            mDividerColor = mResources.getColor(R.color.doorhanger_divider_dark);
+            mDividerColor = mResources.getColor(R.color.divider_dark);
 
             // Set a dark background, and use a smaller text size for dark-themed DoorHangers.
             setBackgroundColor(mResources.getColor(R.color.doorhanger_background_dark));
             mTextView.setTextAppearance(getContext(), R.style.TextAppearance_Widget_DoorHanger_Small);
         }
     }
 
     public int getTabId() {