Bug 1396076 - Part 4 - Revert TabsLayoutItemView padding changes for the "close tab" button. r=jwu
authorJan Henning <jh+bugzilla@buttercookie.de>
Fri, 01 Sep 2017 19:17:33 +0200
changeset 429290 e5e5c095a5eb86fea7ebe6aa28d566b794cf4c51
parent 429289 60f7b76c8f7f7d3c00a2f7be03aebe23b90b3ae2
child 429291 33804f5a3451b67020f421f6d0722c6c7df3ce6b
push id7761
push userjlund@mozilla.com
push dateFri, 15 Sep 2017 00:19:52 +0000
treeherdermozilla-beta@c38455951db4 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjwu
bugs1396076
milestone57.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 1396076 - Part 4 - Revert TabsLayoutItemView padding changes for the "close tab" button. r=jwu We're using Touch- and HoverDelegates to increase the effective clickable area, so there's no need to actually pad the button itself, which disturbs the layout and eats into the space available for displaying the tab's title. MozReview-Commit-ID: CKS2OIoS1xr
mobile/android/app/src/main/res/layout-large/tabs_layout_item_view.xml
mobile/android/app/src/main/res/layout/tabs_layout_item_view.xml
--- a/mobile/android/app/src/main/res/layout-large/tabs_layout_item_view.xml
+++ b/mobile/android/app/src/main/res/layout-large/tabs_layout_item_view.xml
@@ -25,31 +25,29 @@
                android:layout_width="0dip"
                android:layout_height="wrap_content"
                android:layout_weight="1.0"
                style="@style/TabLayoutItemTextAppearance"
                android:textSize="14sp"
                android:textColor="@color/tab_item_title"
                android:singleLine="true"
                android:duplicateParentState="true"
-               android:layout_gravity="center_vertical"
                gecko:fadeWidth="15dp"
-               android:minHeight="24dp"
                android:paddingRight="5dp"
                android:paddingEnd="5dp"
                android:paddingLeft="0dp"
                android:paddingStart="0dp"
                android:drawablePadding="6dp"/>
 
         <!-- Use of baselineAlignBottom only supported from API 11+ - if this needs to work on lower API versions
              we'll need to override getBaseLine() and return image height, but we assume this won't happen -->
         <ImageView android:id="@+id/close"
                      style="@style/TabsItemClose"
-                     android:layout_width="24dp"
-                     android:layout_height="24dp"
+                     android:layout_width="wrap_content"
+                     android:layout_height="wrap_content"
                      android:scaleType="center"
                      android:baselineAlignBottom="true"
                      android:background="@android:color/transparent"
                      android:contentDescription="@string/close_tab"
                      android:src="@drawable/tab_item_close_button"
                      android:duplicateParentState="true"/>
 
     </LinearLayout>
--- a/mobile/android/app/src/main/res/layout/tabs_layout_item_view.xml
+++ b/mobile/android/app/src/main/res/layout/tabs_layout_item_view.xml
@@ -18,17 +18,17 @@
                   android:duplicateParentState="true"
                   android:paddingLeft="@dimen/tab_highlight_stroke_width"
                   android:paddingRight="@dimen/tab_highlight_stroke_width"
                   android:paddingBottom="@dimen/tab_highlight_stroke_width">
 
        <org.mozilla.gecko.widget.FadedSingleColorTextView
                android:id="@+id/title"
                android:layout_width="0dip"
-               android:layout_height="match_parent"
+               android:layout_height="wrap_content"
                android:layout_weight="1.0"
                style="@style/TabLayoutItemTextAppearance"
                android:textSize="14sp"
                android:textColor="@color/tab_item_title"
                android:singleLine="true"
                android:duplicateParentState="true"
                gecko:fadeWidth="15dp"
                android:paddingRight="5dp"
@@ -36,18 +36,18 @@
                android:paddingLeft="0dp"
                android:paddingStart="0dp"
                android:drawablePadding="6dp"/>
 
         <!-- Use of baselineAlignBottom only supported from API 11+ - if this needs to work on lower API versions
              we'll need to override getBaseLine() and return image height, but we assume this won't happen -->
         <ImageView android:id="@+id/close"
                      style="@style/TabsItemClose"
-                     android:layout_width="24dp"
-                     android:layout_height="24dp"
+                     android:layout_width="wrap_content"
+                     android:layout_height="wrap_content"
                      android:scaleType="center"
                      android:baselineAlignBottom="true"
                      android:background="@android:color/transparent"
                      android:contentDescription="@string/close_tab"
                      android:src="@drawable/tab_item_close_button"
                      android:duplicateParentState="true"/>
 
     </LinearLayout>