Bug 1148550 - Update 3-dot menu icon to Material in tabs panel. r=mhaigh
authorMichael Comella <michael.l.comella@gmail.com>
Mon, 24 Aug 2015 16:13:21 -0700
changeset 292984 f4080d4944724f46b296ef0fd4219859796d3b56
parent 292983 66f081a2d7d9ab9b88e0d98373e6660e853dc810
child 292985 eb04d3293fed7a207a039496591a2c45d7bac474
push id5245
push userraliiev@mozilla.com
push dateThu, 29 Oct 2015 11:30:51 +0000
treeherdermozilla-beta@dac831dc1bd0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersmhaigh
bugs1148550
milestone43.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 1148550 - Update 3-dot menu icon to Material in tabs panel. r=mhaigh
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_default.xml
mobile/android/base/resources/values/dimens.xml
mobile/android/base/tabs/TabsPanel.java
--- a/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout-large-v11/browser_toolbar.xml
@@ -116,17 +116,17 @@
             android:layout_marginRight="6dp"
             android:contentDescription="@string/menu"
             android:background="@drawable/browser_toolbar_action_bar_button"
             android:visibility="gone">
 
         <org.mozilla.gecko.widget.themed.ThemedImageView
                 android:id="@+id/menu_icon"
                 style="@style/UrlBar.ImageButton.BrowserToolbarColors"
-                android:layout_height="18dp"
+                android:layout_height="@dimen/browser_toolbar_menu_icon_height"
                 android:layout_width="wrap_content"
                 android:scaleType="centerInside"
                 android:src="@drawable/menu"
                 android:layout_gravity="center"/>
 
     </org.mozilla.gecko.widget.themed.ThemedFrameLayout>
 
     <!-- We draw after the menu items so when they are hidden, the cancel button,
--- a/mobile/android/base/resources/layout/browser_toolbar.xml
+++ b/mobile/android/base/resources/layout/browser_toolbar.xml
@@ -42,17 +42,17 @@
             android:layout_alignParentRight="true"
             android:contentDescription="@string/menu"
             android:background="@drawable/shaped_button"
             android:visibility="gone">
 
         <org.mozilla.gecko.widget.themed.ThemedImageView
                 android:id="@+id/menu_icon"
                 style="@style/UrlBar.ImageButton"
-                android:layout_height="16dp"
+                android:layout_height="@dimen/browser_toolbar_menu_icon_height"
                 android:layout_width="wrap_content"
                 android:scaleType="centerInside"
                 android:layout_gravity="center"
                 android:src="@drawable/menu"
                 android:tint="@color/tabs_tray_icon_grey"/>
 
     </org.mozilla.gecko.widget.themed.ThemedFrameLayout>
 
--- a/mobile/android/base/resources/layout/tabs_panel_default.xml
+++ b/mobile/android/base/resources/layout/tabs_panel_default.xml
@@ -38,24 +38,33 @@
             <ImageButton android:id="@+id/add_tab"
                          style="@style/UrlBar.ImageButton"
                          android:layout_width="@dimen/tabs_panel_button_width"
                          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"
+            <FrameLayout android:id="@+id/menu"
                          style="@style/UrlBar.ImageButton"
                          android:layout_width="@dimen/tabs_panel_button_width"
-                         android:padding="@dimen/browser_toolbar_button_padding"
-                         android:src="@drawable/menu"
+                         android:background="@drawable/action_bar_button_inverse"
                          android:contentDescription="@string/menu"
-                         android:background="@drawable/action_bar_button_inverse"
-                         android:visibility="gone"/>
+                         android:visibility="gone">
+
+                <ImageButton
+                        style="@style/UrlBar.ImageButton"
+                        android:layout_width="wrap_content"
+                        android:layout_height="@dimen/browser_toolbar_menu_icon_height"
+                        android:layout_gravity="center"
+                        android:scaleType="centerInside"
+                        android:src="@drawable/menu"
+                        android:tint="@color/tabs_tray_icon_grey"/>
+
+            </FrameLayout>
 
         </view>
 
         <View android:layout_width="match_parent"
               android:layout_height="2dp"
               android:layout_alignParentBottom="true"
               android:background="#1A000000"/>
 
--- a/mobile/android/base/resources/values/dimens.xml
+++ b/mobile/android/base/resources/values/dimens.xml
@@ -16,16 +16,17 @@
          (6dp). This value should change when the height of the view changes. -->
     <dimen name="tabs_panel_indicator_selected_padding_top">42dp</dimen>
 
     <!-- We use two different values for browser_toolbar_height on tablet
          which is inconsistent. Temporary value until bug 1150730 is fixed. -->
     <dimen name="browser_toolbar_height_flipper">48dp</dimen>
     <dimen name="browser_toolbar_button_padding">12dp</dimen>
     <dimen name="browser_toolbar_icon_width">48dp</dimen>
+    <dimen name="browser_toolbar_menu_icon_height">16dp</dimen>
 
     <!-- favicon_size includes 4dp of right padding. We can't use margin (which would allow us to
          specify the actual size) because that would decrease the size of our hit target. -->
     <dimen name="browser_toolbar_favicon_size">21.33dip</dimen>
     <dimen name="browser_toolbar_shadow_size">2dp</dimen>
 
     <!-- If you update one of these values, update the others. -->
     <dimen name="tablet_nav_button_width">42dp</dimen>
--- a/mobile/android/base/tabs/TabsPanel.java
+++ b/mobile/android/base/tabs/TabsPanel.java
@@ -75,17 +75,17 @@ public class TabsPanel extends LinearLay
     private RelativeLayout mHeader;
     private FrameLayout mTabsContainer;
     private PanelView mPanel;
     private PanelView mPanelNormal;
     private PanelView mPanelPrivate;
     private TabsLayoutChangeListener mLayoutChangeListener;
 
     private IconTabWidget mTabWidget;
-    private static ImageButton mMenuButton;
+    private static View mMenuButton;
     private static ImageButton mAddTab;
     private ImageButton mNavBackButton;
 
     private Panel mCurrentPanel;
     private boolean mVisible;
     private boolean mHeaderVisible;
 
     private final GeckoPopupMenu mPopupMenu;
@@ -136,17 +136,17 @@ public class TabsPanel extends LinearLay
         privateTabsPanel.setPrivateMode(true);
 
         if (!RestrictedProfiles.isAllowed(mContext, Restriction.DISALLOW_PRIVATE_BROWSING)) {
             mTabWidget.setVisibility(View.GONE);
         }
 
         mTabWidget.setTabSelectionListener(this);
 
-        mMenuButton = (ImageButton) findViewById(R.id.menu);
+        mMenuButton = findViewById(R.id.menu);
         mMenuButton.setOnClickListener(new Button.OnClickListener() {
             @Override
             public void onClick(View view) {
                 showMenu();
             }
         });
 
         if (HardwareUtils.isTablet()) {