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

Unified Diff: chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java

Issue 2898093002: [Home] Don't show toolbar buttons until sheet is below 45% (Closed)
Patch Set: Created 3 years, 7 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/toolbar/BottomToolbarPhone.java
diff --git a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
index 56968d8b0486440ffd3138e678b8c517ab600b69..c573b6353987d1c50f98a324418e2d855fe58395 100644
--- a/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
+++ b/chrome/android/java/src/org/chromium/chrome/browser/toolbar/BottomToolbarPhone.java
@@ -71,8 +71,12 @@ public class BottomToolbarPhone extends ToolbarPhone {
if (isMovingUp && !mAnimatingToolbarButtonDisappearance
&& mToolbarButtonVisibilityPercent != 0.f) {
animateToolbarButtonVisibility(false);
- } else if (isMovingDown && heightFraction <= 0.5f && !mAnimatingToolbarButtonAppearance
+ } else if (isMovingDown && heightFraction < 0.45f && !mAnimatingToolbarButtonAppearance
&& mToolbarButtonVisibilityPercent != 1.f) {
+ // If the sheet is moving down and the height is less than 45% of the max, start
+ // showing the toolbar buttons. 45% is used rather than 50% so that the buttons
+ // aren't shown in the half height state if the user is dragging the sheet down
+ // slowly and releases at exactly the half way point.
animateToolbarButtonVisibility(true);
}
« 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