Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(100)

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/widget/displaystyle/UiConfig.java

Issue 2703233002: 📰 Use "> 320dp" instead of ">= 360dp" for regular layouts (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/android/java/src/org/chromium/chrome/browser/widget/displaystyle/UiConfig.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/widget/displaystyle/UiConfig.java b/chrome/android/java/src/org/chromium/chrome/browser/widget/displaystyle/UiConfig.java
index ce5bfd98f155c1cd52a55ccac3d9af25e94b5b29..5aa23d684c6bc2363439a64d752c3f62d9da42e6 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/widget/displaystyle/UiConfig.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/widget/displaystyle/UiConfig.java
@@ -19,10 +19,9 @@
* Exposes general configuration info about the display style for a given reference View.
*/
public class UiConfig {
-
- public static final int REGULAR_DISPLAY_STYLE_MIN_WIDTH_DP = 360;
+ public static final int NARROW_DISPLAY_STYLE_MAX_WIDTH_DP = 320;
public static final int WIDE_DISPLAY_STYLE_MIN_WIDTH_DP = 600;
- public static final int REGULAR_DISPLAY_STYLE_MIN_HEIGHT_DP = 360;
+ public static final int FLAT_DISPLAY_STYLE_MAX_HEIGHT_DP = 320;
private static final String TAG = "DisplayStyle";
private static final boolean DEBUG = false;
@@ -94,7 +93,7 @@ private DisplayStyle computeDisplayStyleForCurrentConfig() {
@HorizontalDisplayStyle
int newHorizontalDisplayStyle;
- if (widthDp < REGULAR_DISPLAY_STYLE_MIN_WIDTH_DP) {
+ if (widthDp <= NARROW_DISPLAY_STYLE_MAX_WIDTH_DP) {
newHorizontalDisplayStyle = HorizontalDisplayStyle.NARROW;
} else if (widthDp >= WIDE_DISPLAY_STYLE_MIN_WIDTH_DP) {
newHorizontalDisplayStyle = HorizontalDisplayStyle.WIDE;
@@ -104,8 +103,8 @@ private DisplayStyle computeDisplayStyleForCurrentConfig() {
@VerticalDisplayStyle
int newVerticalDisplayStyle =
- heightDp < REGULAR_DISPLAY_STYLE_MIN_HEIGHT_DP ? VerticalDisplayStyle.FLAT
- : VerticalDisplayStyle.REGULAR;
+ heightDp <= FLAT_DISPLAY_STYLE_MAX_HEIGHT_DP ? VerticalDisplayStyle.FLAT
+ : VerticalDisplayStyle.REGULAR;
final DisplayStyle displayStyle =
new DisplayStyle(newHorizontalDisplayStyle, newVerticalDisplayStyle);
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698