Bug 1054319 - Consolidate UrlBar.ImageButton default width in style (r=margaret)
authorLucas Rocha <lucasr@mozilla.com>
Mon, 18 Aug 2014 10:40:09 +0100
changeset 221688 65eb82e40f0a50363762c113be122dec66ccacfe
parent 221687 f2c47e9e45e752f5c094791257fba6a82563f005
child 221689 695e23d833b62443f01bc2dba83e04e372080864
push id3979
push userraliiev@mozilla.com
push dateMon, 13 Oct 2014 16:35:44 +0000
treeherdermozilla-beta@30f2cc610691 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmargaret
bugs1054319
milestone34.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 1054319 - Consolidate UrlBar.ImageButton default width in style (r=margaret)
mobile/android/base/resources/layout-large-land-v11/tabs_panel_footer.xml
mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
mobile/android/base/resources/layout/browser_toolbar.xml
mobile/android/base/resources/layout/tabs_panel_header.xml
mobile/android/base/resources/layout/toolbar_display_layout.xml
mobile/android/base/resources/values/styles.xml
--- a/mobile/android/base/resources/layout-large-land-v11/tabs_panel_footer.xml
+++ b/mobile/android/base/resources/layout-large-land-v11/tabs_panel_footer.xml
@@ -14,17 +14,15 @@
                  android:background="@drawable/action_bar_button_inverse"/>
 
     <View android:layout_width="0dip"
           android:layout_height="match_parent"
           android:layout_weight="1.0"/>
 
     <ImageButton android:id="@+id/menu"
                  style="@style/UrlBar.ImageButton"
-                 android:layout_width="@dimen/browser_toolbar_height"
-                 android:layout_height="@dimen/browser_toolbar_height"
                  android:padding="@dimen/browser_toolbar_button_padding"
                  android:src="@drawable/menu_tabs"
                  android:contentDescription="@string/menu"
                  android:background="@drawable/action_bar_button"
                  android:visibility="gone"/>
 
 </merge>
--- a/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
@@ -83,17 +83,16 @@
                   android:layout_height="match_parent"
                   android:layout_marginLeft="3dp"
                   android:orientation="horizontal"
                   android:layout_toLeftOf="@id/menu"
                   android:layout_alignWithParentIfMissing="true"/>
 
     <org.mozilla.gecko.widget.ThemedImageButton android:id="@+id/menu"
                                                 style="@style/UrlBar.ImageButton"
-                                                android:layout_width="56dip"
                                                 android:layout_alignParentRight="true"
                                                 android:contentDescription="@string/menu"
                                                 android:background="@drawable/action_bar_button"
                                                 android:visibility="gone"/>
 
     <org.mozilla.gecko.widget.ThemedImageView android:id="@+id/menu_icon"
                                               style="@style/UrlBar.ImageButton"
                                               android:layout_alignLeft="@id/menu"
@@ -108,17 +107,17 @@
                android:layout_alignParentBottom="true"
                android:background="@color/url_bar_shadow"
                android:contentDescription="@null"/>
 
     <!-- We draw after the menu items so when they are hidden, the cancel button,
          which is thus drawn on top, may be pressed. -->
     <org.mozilla.gecko.widget.ThemedImageView
             android:id="@+id/edit_cancel"
-            style="@style/UrlBar.ImageButton.Icon"
+            style="@style/UrlBar.ImageButton"
             android:layout_alignParentRight="true"
             android:src="@drawable/close_edit_mode_selector"
             android:background="@drawable/action_bar_button"
             android:paddingLeft="2dp"
             android:paddingRight="2dp"
             android:contentDescription="@string/edit_mode_cancel"
             android:visibility="gone"/>
 
--- a/mobile/android/base/resources/layout/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout/browser_toolbar.xml
@@ -48,17 +48,16 @@
                android:src="@drawable/url_bar_translating_edge"
                android:scaleType="fitXY"/>
 
     <LinearLayout android:id="@+id/menu_items"
                   style="@style/UrlBar.ImageButton.Unused"/>
 
     <org.mozilla.gecko.toolbar.ShapedButton android:id="@+id/menu"
                                             style="@style/UrlBar.ImageButton"
-                                            android:layout_width="48dip"
                                             android:layout_alignParentRight="true"
                                             android:contentDescription="@string/menu"
                                             android:background="@drawable/shaped_button"
                                             android:visibility="gone"/>
 
     <org.mozilla.gecko.widget.ThemedImageView android:id="@+id/menu_icon"
                                               style="@style/UrlBar.ImageButton"
                                               android:layout_alignLeft="@id/menu"
@@ -88,17 +87,17 @@
                         android:layout_centerVertical="true"
                         android:layout_marginRight="8dip"
                         android:layout_alignRight="@id/tabs"/>
 
     <!-- Note that the edit components are invisible so that the views
          depending on their location can properly layout. -->
     <org.mozilla.gecko.widget.ThemedImageView
             android:id="@+id/edit_cancel"
-            style="@style/UrlBar.ImageButton.Icon"
+            style="@style/UrlBar.ImageButton"
             android:layout_alignParentRight="true"
             android:src="@drawable/close_edit_mode_selector"
             android:contentDescription="@string/edit_mode_cancel"
             android:background="@drawable/action_bar_button"
             android:visibility="invisible"/>
 
     <!-- The space to the left of the cancel button would be larger than the right because
          the url bar drawable contains some whitespace, so we compensate by removing
--- a/mobile/android/base/resources/layout/tabs_panel_header.xml
+++ b/mobile/android/base/resources/layout/tabs_panel_header.xml
@@ -13,26 +13,22 @@
                                             android:layout="@layout/tabs_panel_indicator"/>
 
     <View android:layout_width="0dip"
           android:layout_height="match_parent"
           android:layout_weight="1.0"/>
 
     <ImageButton android:id="@+id/add_tab"
                  style="@style/UrlBar.ImageButton"
-                 android:layout_width="@dimen/browser_toolbar_height"
-                 android:layout_height="@dimen/browser_toolbar_height"
                  android:padding="@dimen/browser_toolbar_button_padding"
                  android:src="@drawable/tab_new_level"
                  android:contentDescription="@string/new_tab"
                  android:background="@drawable/action_bar_button_inverse"/>
 
     <ImageButton android:id="@+id/menu"
                  style="@style/UrlBar.ImageButton"
-                 android:layout_width="@dimen/browser_toolbar_height"
-                 android:layout_height="@dimen/browser_toolbar_height"
                  android:padding="@dimen/browser_toolbar_button_padding"
                  android:src="@drawable/menu_tabs"
                  android:contentDescription="@string/menu"
                  android:background="@drawable/action_bar_button"
                  android:visibility="gone"/>
 
 </merge>
--- a/mobile/android/base/resources/layout/toolbar_display_layout.xml
+++ b/mobile/android/base/resources/layout/toolbar_display_layout.xml
@@ -4,17 +4,16 @@
    - file, You can obtain one at http://mozilla.org/MPL/2.0/. -->
 
 <merge xmlns:android="http://schemas.android.com/apk/res/android"
        xmlns:gecko="http://schemas.android.com/apk/res-auto">
 
     <ImageButton android:id="@+id/favicon"
                  style="@style/UrlBar.ImageButton"
                  android:layout_width="@dimen/browser_toolbar_favicon_size"
-                 android:layout_height="match_parent"
                  android:scaleType="fitCenter"
                  android:paddingLeft="4dip"
                  android:paddingRight="4dip"
                  android:layout_gravity="center_vertical"/>
 
     <ImageButton android:id="@+id/site_security"
                  style="@style/UrlBar.ImageButton"
                  android:layout_width="@dimen/browser_toolbar_lock_width"
--- a/mobile/android/base/resources/values/styles.xml
+++ b/mobile/android/base/resources/values/styles.xml
@@ -431,16 +431,17 @@
         <item name="android:textCursorDrawable">@null</item>
         <item name="android:singleLine">true</item>
         <item name="android:gravity">center_vertical|left</item>
         <item name="android:hint">@string/url_bar_default_text</item>
     </style>
 
     <!-- URL bar - Image Button -->
     <style name="UrlBar.ImageButton" parent="UrlBar.Button">
+        <item name="android:layout_width">@dimen/browser_toolbar_height</item>
         <item name="android:scaleType">center</item>
         <item name="android:layout_gravity">center_vertical</item>
         <item name="android:background">@android:color/transparent</item>
     </style>
 
     <!-- URL bar - Image Button - Unused -->
     <style name="UrlBar.ImageButton.Unused">
         <item name="android:layout_width">0dip</item>