Bug 1137333 Clear history button style changes r?margaret draft
authorvivek <vivekb.balakrishnan@gmail.com>
Thu, 01 Oct 2015 00:20:54 +0300
changeset 297772 009659cc15b7719fab19ef64db397fd22e89d8fc
parent 297771 b00623eb77355e98ffc4584ac6baae8ce7b877a4
child 509795 6fec48814582f181978e4dfcfbec02b6cc2a125d
push id5987
push uservivekb.balakrishnan@gmail.com
push dateWed, 30 Sep 2015 21:28:10 +0000
reviewersmargaret
bugs1137333
milestone44.0a1
Bug 1137333 Clear history button style changes r?margaret
mobile/android/base/resources/drawable/home_history_clear_button_bg.xml
mobile/android/base/resources/layout/home_history_clear_button.xml
mobile/android/base/resources/layout/home_history_panel.xml
mobile/android/base/resources/layout/home_history_split_pane_panel.xml
mobile/android/base/resources/values/colors.xml
mobile/android/base/resources/values/styles.xml
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/drawable/home_history_clear_button_bg.xml
@@ -0,0 +1,23 @@
+<?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/.
+  -->
+
+<layer-list xmlns:android="http://schemas.android.com/apk/res/android" >
+    <item>
+        <shape android:shape="rectangle" >
+            <stroke android:width="1dp"
+                    android:color="@color/home_history_clear_button_top_divider" />
+            <padding android:top="1dp" />
+        </shape>
+    </item>
+    <item>
+        <selector>
+            <item android:state_pressed="true"
+                  android:drawable="@color/toolbar_grey_pressed" />
+            <item android:drawable="@color/toolbar_grey"/>
+        </selector>
+    </item>
+</layer-list>
\ No newline at end of file
new file mode 100644
--- /dev/null
+++ b/mobile/android/base/resources/layout/home_history_clear_button.xml
@@ -0,0 +1,10 @@
+<?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/. -->
+
+<Button xmlns:android="http://schemas.android.com/apk/res/android"
+            android:id="@+id/clear_history_button"
+            style="@style/Widget.Home.ActionButton"
+            android:text="@string/home_clear_history_button"
+            android:visibility="gone" />
--- a/mobile/android/base/resources/layout/home_history_panel.xml
+++ b/mobile/android/base/resources/layout/home_history_panel.xml
@@ -5,21 +5,11 @@
 
 <LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
               android:layout_width="match_parent"
               android:layout_height="match_parent"
               android:orientation="vertical">
 
     <include layout="@layout/home_list"/>
 
-    <LinearLayout android:layout_width="match_parent"
-                  android:layout_height="wrap_content"
-                  android:background="@color/home_button_bar_bg">
-
-        <Button android:id="@+id/clear_history_button"
-                style="@style/Widget.Home.ActionButton"
-                android:text="@string/home_clear_history_button"
-                android:gravity="center"
-                android:visibility="gone"/>
-
-    </LinearLayout>
+    <include layout="@layout/home_history_clear_button"/>
 
 </LinearLayout>
--- a/mobile/android/base/resources/layout/home_history_split_pane_panel.xml
+++ b/mobile/android/base/resources/layout/home_history_split_pane_panel.xml
@@ -36,18 +36,11 @@
             android:id="@+id/list"
             style="@style/Widget.HistoryListView"
             android:layout_width="0dp"
             android:layout_height="match_parent"
             android:layout_weight="@dimen/split_plane_right_pane_weight"/>
 
     </LinearLayout>
 
-    <Button android:id="@+id/clear_history_button"
-            style="@style/Widget.Home.ActionButton"
-            android:layout_width="match_parent"
-            android:layout_height="wrap_content"
-            android:background="@color/home_button_bar_bg"
-            android:text="@string/home_clear_history_button"
-            android:gravity="center"
-            android:visibility="gone"/>
+    <include layout="@layout/home_history_clear_button"/>
 
 </LinearLayout>
--- a/mobile/android/base/resources/values/colors.xml
+++ b/mobile/android/base/resources/values/colors.xml
@@ -113,16 +113,17 @@
 
   <color name="url_bar_urltext">#A6A6A6</color>
   <color name="url_bar_domaintext">#000</color>
   <color name="url_bar_domaintext_private">#FFF</color>
   <color name="url_bar_blockedtext">#b14646</color>
   <color name="url_bar_shadow">#12000000</color>
 
   <color name="home_button_bar_bg">#FFF5F7F9</color>
+  <color name="home_history_clear_button_top_divider">#D7D9DB</color>
 
   <color name="panel_image_item_background">#D1D9E1</color>
   <color name="panel_icon_item_title_background">#32000000</color>
   <color name="panel_tab_text_normal">#FFBFBFBF</color>
 
   <!-- Swipe to refresh colors for dynamic panel -->
   <color name="swipe_refresh_orange">#FFFFC26C</color>
   <color name="swipe_refresh_white">#FFFFFFFF</color>
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -253,31 +253,28 @@
         <item name="android:textAppearance">@style/TextAppearance.Widget.Home.Header</item>
         <item name="android:background">@color/about_page_header_grey</item>
         <item name="android:focusable">false</item>
         <item name="android:gravity">center|left</item>
         <item name="android:paddingLeft">10dip</item>
         <item name="android:paddingRight">10dip</item>
     </style>
 
-    <style name="Widget.Home.PageButton">
+    <style name="Widget.Home.ActionButton">
         <item name="android:layout_width">match_parent</item>
-        <item name="android:layout_height">40dip</item>
-        <item name="android:textAppearance">@style/TextAppearance.Widget.Home.PageTitle</item>
-        <item name="android:background">@drawable/action_bar_button</item>
+        <item name="android:layout_height">@dimen/browser_toolbar_height</item>
+        <item name="android:textColor">@color/tabs_tray_icon_grey</item>
+        <item name="android:textSize">14sp</item>
+        <item name="android:background">@drawable/home_history_clear_button_bg</item>
         <item name="android:focusable">true</item>
-        <item name="android:gravity">center|left</item>
+        <item name="android:gravity">center</item>
         <item name="android:paddingLeft">10dip</item>
         <item name="android:paddingRight">10dip</item>
     </style>
 
-    <style name="Widget.Home.ActionButton" parent="Widget.Home.PageButton">
-        <item name="android:textAppearance">@style/TextAppearance.Widget.Home.PageAction</item>
-    </style>
-
     <style name="Widget.Home.ActionItem">
         <item name="android:layout_width">fill_parent</item>
         <item name="android:layout_height">40dip</item>
         <item name="android:textColor">#000000</item>
         <item name="android:gravity">center</item>
     </style>
 
     <style name="Widget.Firstrun.Button" parent="Widget.BaseButton">