Bug 1077730 - Implement new tablet url bar navigation button colors (with temporary focused state). r=lucasr
authorMichael Comella <michael.l.comella@gmail.com>
Mon, 06 Oct 2014 16:45:54 -0700
changeset 233630 47f97b452b9c6e84036a5dd674057707d3f260f0
parent 233629 5a9fb5ef760572446bfe338c296ce8dd458697d5
child 233631 896e255af48ebaf6fc0b5581865fcdbd53e07733
push id611
push userraliiev@mozilla.com
push dateMon, 05 Jan 2015 23:23:16 +0000
treeherdermozilla-release@345cd3b9c445 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerslucasr
bugs1077730
milestone35.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 1077730 - Implement new tablet url bar navigation button colors (with temporary focused state). r=lucasr
mobile/android/base/newtablet/res/drawable-large-v11/new_tablet_action_bar_button.xml
mobile/android/base/newtablet/res/drawable-large-v11/new_tablet_url_bar_nav_button.xml
mobile/android/base/newtablet/res/layout-large-v11/new_tablet_browser_toolbar.xml
mobile/android/base/resources/values-large-v11/styles.xml
mobile/android/base/resources/values/colors.xml
--- a/mobile/android/base/newtablet/res/drawable-large-v11/new_tablet_action_bar_button.xml
+++ b/mobile/android/base/newtablet/res/drawable-large-v11/new_tablet_action_bar_button.xml
@@ -8,32 +8,32 @@
     <item android:state_pressed="true"
           android:state_enabled="true">
 
         <inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
                android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
                android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
                android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
             <shape android:shape="rectangle">
-                <solid android:color="#D7D7DC"/>
+                <solid android:color="@color/new_tablet_highlight"/>
                 <corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
             </shape>
         </inset>
 
     </item>
 
     <item android:state_focused="true"
           android:state_pressed="false">
 
         <inset android:insetTop="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
                android:insetBottom="@dimen/new_tablet_browser_toolbar_menu_item_inset_vertical"
                android:insetLeft="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal"
                android:insetRight="@dimen/new_tablet_browser_toolbar_menu_item_inset_horizontal">
             <shape android:shape="rectangle">
-                <solid android:color="#C0C9D0"/>
+                <solid android:color="@color/new_tablet_highlight_focused"/>
                 <corners android:radius="@dimen/new_tablet_browser_toolbar_menu_item_corner_radius"/>
             </shape>
         </inset>
 
     </item>
 
     <item>
         <shape android:shape="rectangle">
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/newtablet/res/drawable-large-v11/new_tablet_url_bar_nav_button.xml
@@ -0,0 +1,36 @@
+<?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">
+
+    <!-- private pressed state -->
+    <item gecko:state_private="true"
+          android:state_pressed="true"
+          android:drawable="@color/new_tablet_highlight_pb"/>
+
+    <!-- focused state -->
+    <item gecko:state_private="true"
+          android:state_focused="true"
+          android:state_pressed="false"
+          android:drawable="@color/new_tablet_highlight_focused_pb"/>
+
+    <!-- pressed state -->
+    <item android:state_pressed="true"
+          android:drawable="@color/new_tablet_highlight"/>
+
+    <!-- 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/background_private"/>
+
+    <!-- normal mode -->
+    <item android:drawable="@color/background_normal"/>
+
+</selector>
--- a/mobile/android/base/newtablet/res/layout-large-v11/new_tablet_browser_toolbar.xml
+++ b/mobile/android/base/newtablet/res/layout-large-v11/new_tablet_browser_toolbar.xml
@@ -27,17 +27,17 @@
                                           style="@style/UrlBar.ImageButton.NewTablet"
                                           android:layout_width="@dimen/back_button_width"
                                           android:layout_height="@dimen/back_button_width"
                                           android:layout_centerVertical="true"
                                           android:layout_marginLeft="12dp"
                                           android:layout_alignParentLeft="true"
                                           android:src="@drawable/new_tablet_ic_menu_back"
                                           android:contentDescription="@string/back"
-                                          android:background="@drawable/url_bar_nav_button"/>
+                                          android:background="@drawable/new_tablet_url_bar_nav_button"/>
 
     <org.mozilla.gecko.toolbar.ToolbarEditLayout android:id="@+id/edit_layout"
                   style="@style/UrlBar.Button"
                   android:paddingLeft="12dp"
                   android:paddingRight="12dp"
                   android:visibility="gone"
                   android:orientation="horizontal"
                   android:layout_toRightOf="@id/back"
--- a/mobile/android/base/resources/values-large-v11/styles.xml
+++ b/mobile/android/base/resources/values-large-v11/styles.xml
@@ -28,16 +28,17 @@
     <style name="UrlBar.ImageButton.Forward.NewTablet">
         <item name="android:layout_marginLeft">@dimen/new_tablet_forward_default_offset</item>
         <item name="android:layout_height">match_parent</item>
         <item name="android:paddingTop">0dp</item>
         <item name="android:paddingBottom">0dp</item>
         <item name="android:layout_marginTop">11.5dp</item>
         <item name="android:layout_marginBottom">11.5dp</item>
         <item name="android:src">@drawable/new_tablet_ic_menu_forward</item>
+        <item name="android:background">@drawable/new_tablet_url_bar_nav_button</item>
     </style>
 
     <style name="UrlBar.ImageButton.TabCount.NewTablet">
         <item name="android:background">@drawable/new_tablet_tabs_count</item>
 
         <!-- From UrlBar.ImageButton.NewTablet because we can't inherit directly. -->
         <item name="android:layout_width">@dimen/new_tablet_browser_toolbar_menu_item_width</item>
     </style>
--- a/mobile/android/base/resources/values/colors.xml
+++ b/mobile/android/base/resources/values/colors.xml
@@ -8,16 +8,22 @@
   <color name="background_normal">#FFEBEBF0</color>
   <color name="background_private">#FF292C29</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>
 
+  <!-- (bug 1077195) Focused state values are temporary. -->
+  <color name="new_tablet_highlight">#D7D7DC</color>
+  <color name="new_tablet_highlight_focused">#C0C9D0</color>
+  <color name="new_tablet_highlight_pb">#222222</color>
+  <color name="new_tablet_highlight_focused_pb">#363B40</color>
+
   <!-- highlight on shaped button: 20% white over background_tabs -->
   <color name="highlight_shaped">#FF696D71</color>
 
   <!-- highlight-focused on shaped button: 10% white over background_tabs -->
   <color name="highlight_shaped_focused">#FF565B60</color>
 
   <!-- highlight on nav button: 20% black over background_normal -->
   <color name="highlight_nav">#FFA5ACB2</color>