Bug 864958 - Replace private toolbar background with tabs_tray_grey_pressed. r=mhaigh
authorMichael Comella <michael.l.comella@gmail.com>
Thu, 23 Apr 2015 18:01:23 -0700
changeset 281128 66cd9d9bf23b1e7a17113fe00f7a79edffe647e7
parent 281127 abc988d2a1fd4d1f20c20813f0b1efe4df50cb38
child 281129 f8d90a2adc9d72d055aabe09cf5fc5b607541d0a
push id4932
push userjlund@mozilla.com
push dateMon, 10 Aug 2015 18:23:06 +0000
treeherdermozilla-beta@6dd5a4f5f745 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh
bugs864958
milestone41.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 864958 - Replace private toolbar background with tabs_tray_grey_pressed. r=mhaigh
mobile/android/base/PrivateTab.java
mobile/android/base/gfx/LayerRenderer.java
mobile/android/base/resources/color-large-v11/new_tablet_tab_strip_item_bg.xml
mobile/android/base/resources/drawable-large-v11/new_tablet_url_bar_nav_button.xml
mobile/android/base/resources/drawable/url_bar_bg.xml
mobile/android/base/resources/values/colors.xml
mobile/android/base/toolbar/BrowserToolbar.java
mobile/android/base/toolbar/NavButton.java
mobile/android/themes/core/aboutPrivateBrowsing.css
--- a/mobile/android/base/PrivateTab.java
+++ b/mobile/android/base/PrivateTab.java
@@ -10,17 +10,17 @@ import android.content.Context;
 import org.mozilla.gecko.db.BrowserDB;
 
 public class PrivateTab extends Tab {
     public PrivateTab(Context context, int id, String url, boolean external, int parentId, String title) {
         super(context, id, url, external, parentId, title);
 
         // Init background to private_toolbar_grey to ensure flicker-free
         // private tab creation. Page loads will reset it to white as expected.
-        final int bgColor = context.getResources().getColor(R.color.private_toolbar_grey);
+        final int bgColor = context.getResources().getColor(R.color.tabs_tray_grey_pressed);
         setBackgroundColor(bgColor);
     }
 
     @Override
     protected void saveThumbnailToDB(final BrowserDB db) {}
 
     @Override
     public boolean isPrivate() {
--- a/mobile/android/base/gfx/LayerRenderer.java
+++ b/mobile/android/base/gfx/LayerRenderer.java
@@ -682,17 +682,17 @@ public class LayerRenderer implements Ta
     public void onTabChanged(final Tab tab, Tabs.TabEvents msg, Object data) {
         // Sets the background of the newly selected tab. This background color
         // gets cleared in endDrawing(). This function runs on the UI thread,
         // but other code that touches the paint state is run on the compositor
         // thread, so this may need to be changed if any problems appear.
         if (msg == Tabs.TabEvents.SELECTED) {
             if (mView != null) {
                 final int overscrollColor =
-                        (tab.isPrivate() ? R.color.private_toolbar_grey : R.color.toolbar_grey);
+                        (tab.isPrivate() ? R.color.tabs_tray_grey_pressed : R.color.toolbar_grey);
                 setOverscrollColor(overscrollColor);
 
                 if (mView.getChildAt(0) != null) {
                     mView.getChildAt(0).setBackgroundColor(tab.getBackgroundColor());
                 }
                 mView.setPaintState(LayerView.PAINT_START);
             }
         }
--- a/mobile/android/base/resources/color-large-v11/new_tablet_tab_strip_item_bg.xml
+++ b/mobile/android/base/resources/color-large-v11/new_tablet_tab_strip_item_bg.xml
@@ -8,17 +8,17 @@
 
     <item android:state_pressed="true"
           android:state_checked="true"
           gecko:state_private="true"
           android:color="@color/highlight_nav_pb" />
 
     <item android:state_checked="true"
           gecko:state_private="true"
-          android:color="@color/private_toolbar_grey" />
+          android:color="@color/tabs_tray_grey_pressed" />
 
     <item android:state_pressed="true"
           gecko:state_private="true"
           android:color="@color/highlight_dark_focused" />
 
     <item android:state_pressed="true"
           android:state_checked="true"
           android:color="@color/toolbar_grey_pressed" />
--- a/mobile/android/base/resources/drawable-large-v11/new_tablet_url_bar_nav_button.xml
+++ b/mobile/android/base/resources/drawable-large-v11/new_tablet_url_bar_nav_button.xml
@@ -23,14 +23,14 @@
 
     <!-- focused state -->
     <item android:state_focused="true"
           android:state_pressed="false"
           android:drawable="@color/new_tablet_highlight_focused"/>
 
     <!-- private browsing mode -->
     <item gecko:state_private="true"
-          android:drawable="@color/private_toolbar_grey"/>
+          android:drawable="@color/tabs_tray_grey_pressed"/>
 
     <!-- normal mode -->
     <item android:drawable="@color/toolbar_grey"/>
 
 </selector>
--- a/mobile/android/base/resources/drawable/url_bar_bg.xml
+++ b/mobile/android/base/resources/drawable/url_bar_bg.xml
@@ -2,14 +2,14 @@
 <!-- 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">
 
     <!-- private browsing mode -->
-    <item gecko:state_private="true" android:drawable="@color/private_toolbar_grey"/>
+    <item gecko:state_private="true" android:drawable="@color/tabs_tray_grey_pressed"/>
 
     <!-- normal mode -->
     <item android:drawable="@color/toolbar_grey"/>
 
 </selector>
--- a/mobile/android/base/resources/values/colors.xml
+++ b/mobile/android/base/resources/values/colors.xml
@@ -27,16 +27,17 @@
   <color name="toolbar_grey">#EBEBF0</color>
   <color name="about_page_header_grey">#F5F5F5</color>
 
   <!-- Non-palette colors -->
 
   <!-- Synced w/ toolbar_grey -->
   <color name="background_normal_lwt">#DDEBEBF0</color>
 
+  <color name="background_tabs">#FF363B40</color>
   <color name="highlight">#33000000</color>
   <color name="highlight_focused">#1A000000</color>
   <color name="highlight_dark">#33FFFFFF</color>
   <color name="highlight_dark_focused">#1AFFFFFF</color>
 
   <!-- Synced w/ toolbar_grey_pressed -->
   <color name="new_tablet_highlight_lwt">#AAD7D7DC</color>
 
--- a/mobile/android/base/toolbar/BrowserToolbar.java
+++ b/mobile/android/base/toolbar/BrowserToolbar.java
@@ -898,17 +898,17 @@ public abstract class BrowserToolbar ext
     @Override
     public void onLightweightThemeChanged() {
         final Drawable drawable = getLWTDefaultStateSetDrawable();
         if (drawable == null) {
             return;
         }
 
         final StateListDrawable stateList = new StateListDrawable();
-        stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.private_toolbar_grey));
+        stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.tabs_tray_grey_pressed));
         stateList.addState(EMPTY_STATE_SET, drawable);
 
         setBackgroundDrawable(stateList);
     }
 
     @Override
     public void onLightweightThemeReset() {
         setBackgroundResource(R.drawable.url_bar_bg);
--- a/mobile/android/base/toolbar/NavButton.java
+++ b/mobile/android/base/toolbar/NavButton.java
@@ -67,17 +67,17 @@ abstract class NavButton extends ShapedB
             return;
         }
 
         final StateListDrawable stateList = new StateListDrawable();
         stateList.addState(PRIVATE_PRESSED_STATE_SET, getColorDrawable(R.color.placeholder_active_grey));
         stateList.addState(PRESSED_ENABLED_STATE_SET, getColorDrawable(R.color.toolbar_grey_pressed));
         stateList.addState(PRIVATE_FOCUSED_STATE_SET, getColorDrawable(R.color.text_and_tabs_tray_grey));
         stateList.addState(FOCUSED_STATE_SET, getColorDrawable(R.color.new_tablet_highlight_focused));
-        stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.private_toolbar_grey));
+        stateList.addState(PRIVATE_STATE_SET, getColorDrawable(R.color.tabs_tray_grey_pressed));
         stateList.addState(EMPTY_STATE_SET, drawable);
 
         setBackgroundDrawable(stateList);
     }
 
     @Override
     public void onLightweightThemeReset() {
         setBackgroundResource(R.drawable.new_tablet_url_bar_nav_button);
--- a/mobile/android/themes/core/aboutPrivateBrowsing.css
+++ b/mobile/android/themes/core/aboutPrivateBrowsing.css
@@ -15,17 +15,17 @@ body.private .showNormal {
 }
 
 div.contentSection {
   max-width: 400px;
   margin:auto;
 }
 
 body.private {
-  background-color: #292c29;
+  background-color: #45494E; /* tabs_tray_grey_pressed */
   color: #afb1b3; /* tabs_tray_icon_grey */
 }
 
 body.normal {
   background-color: #eeeeee;
   color: #777777; /* placeholder gray */
 }