Bug 1221030 - Tablets: Restore tab thumbnail aspect ratio. r?mcomella. draft
authorSebastian Kaspari <s.kaspari@gmail.com>
Tue, 03 Nov 2015 12:51:09 +0000
changeset 306828 7583ebfe2c86fe90d4aee9babbaf400debe7b2c6
parent 306595 f2f176ef9b45115ba655b78f3562d3e447513d85
child 510904 7bcdb32f5e2ba4c728dcc22e1e2cba7b8ca24d1b
push id7203
push users.kaspari@gmail.com
push dateThu, 05 Nov 2015 15:31:02 +0000
reviewersmcomella
bugs1221030
milestone43.0
Bug 1221030 - Tablets: Restore tab thumbnail aspect ratio. r?mcomella.
mobile/android/base/tabs/TabsPanelThumbnailView.java
--- a/mobile/android/base/tabs/TabsPanelThumbnailView.java
+++ b/mobile/android/base/tabs/TabsPanelThumbnailView.java
@@ -3,16 +3,17 @@
  * 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/. */
 
 package org.mozilla.gecko.tabs;
 
 import org.mozilla.gecko.AppConstants;
 import org.mozilla.gecko.R;
 import org.mozilla.gecko.ThumbnailHelper;
+import org.mozilla.gecko.util.HardwareUtils;
 import org.mozilla.gecko.widget.CropImageView;
 
 import android.content.Context;
 import android.graphics.drawable.Drawable;
 import android.util.AttributeSet;
 
 /**
  *  A width constrained ImageView to show thumbnails of open tabs in the tabs panel.
@@ -30,17 +31,17 @@ public class TabsPanelThumbnailView exte
     }
 
     public TabsPanelThumbnailView(Context context, AttributeSet attrs, int defStyle) {
         super(context, attrs, defStyle);
     }
 
     @Override
     protected float getAspectRatio() {
-        if (AppConstants.NIGHTLY_BUILD) {
+        if (AppConstants.NIGHTLY_BUILD || HardwareUtils.isTablet()) {
             return ThumbnailHelper.TABS_PANEL_THUMBNAIL_ASPECT_RATIO;
         } else {
             return ThumbnailHelper.TOP_SITES_THUMBNAIL_ASPECT_RATIO;
         }
     }
 
     @Override
     public void setImageDrawable(Drawable drawable) {