From eb14b50ced238a01806ca2fa3b30396cc26472ba Mon Sep 17 00:00:00 2001 From: Martyn Haigh Date: Tue, 15 Sep 2015 15:46:23 +0100 Subject: [PATCH] Bug 1204875 - Hide Tabs Panel thumbnail height change behind nightly flag; r=mfinkle --- mobile/android/base/ThumbnailHelper.java | 2 +- mobile/android/base/tabs/TabsPanelThumbnailView.java | 7 ++++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/mobile/android/base/ThumbnailHelper.java b/mobile/android/base/ThumbnailHelper.java index 25213068fa3..e77e46c841f 100644 --- a/mobile/android/base/ThumbnailHelper.java +++ b/mobile/android/base/ThumbnailHelper.java @@ -32,7 +32,7 @@ public final class ThumbnailHelper { public static final float TABS_PANEL_THUMBNAIL_ASPECT_RATIO = 0.8333333f; public static final float TOP_SITES_THUMBNAIL_ASPECT_RATIO = 0.571428571f; // this is a 4:7 ratio (as per UX decision) - private static final float THUMBNAIL_ASPECT_RATIO; + public static final float THUMBNAIL_ASPECT_RATIO; static { // As we only want to generate one thumbnail for each tab, we calculate the diff --git a/mobile/android/base/tabs/TabsPanelThumbnailView.java b/mobile/android/base/tabs/TabsPanelThumbnailView.java index 09254bf7670..66ee3b4ab5d 100644 --- a/mobile/android/base/tabs/TabsPanelThumbnailView.java +++ b/mobile/android/base/tabs/TabsPanelThumbnailView.java @@ -5,6 +5,7 @@ package org.mozilla.gecko.tabs; +import org.mozilla.gecko.AppConstants; import org.mozilla.gecko.R; import org.mozilla.gecko.ThumbnailHelper; import org.mozilla.gecko.widget.CropImageView; @@ -34,7 +35,11 @@ public class TabsPanelThumbnailView extends CropImageView { @Override protected float getAspectRatio() { - return ThumbnailHelper.TABS_PANEL_THUMBNAIL_ASPECT_RATIO; + if (AppConstants.NIGHTLY_BUILD) { + return ThumbnailHelper.TABS_PANEL_THUMBNAIL_ASPECT_RATIO; + } else { + return ThumbnailHelper.TOP_SITES_THUMBNAIL_ASPECT_RATIO; + } } @Override