Commit c486f71e authored by Jinsuk Kim's avatar Jinsuk Kim Committed by Commit Bot

EphemeralTab: Bigger peek panel

This CL makes the ephemeral tab in peeked state 150% larger. Top portion
of the content being loaded as well as the progress bar becomes quite
visible.

Bug: 894619
Change-Id: I2aa5d39a4a9592c07421136c00d74c54b9c916ae
Reviewed-on: https://chromium-review.googlesource.com/c/1349150Reviewed-by: default avatarMatthew Jones <mdjones@chromium.org>
Commit-Queue: Jinsuk Kim <jinsukkim@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611573}
parent 74e258c6
...@@ -27,7 +27,9 @@ import org.chromium.ui.resources.ResourceManager; ...@@ -27,7 +27,9 @@ import org.chromium.ui.resources.ResourceManager;
/** /**
* The panel containing an ephemeral tab. * The panel containing an ephemeral tab.
* TODO(jinsukkim): Make panel height in peeked state bigger to show the progress indicator clearly. * TODO(jinsukkim): Write tests.
* Add animation effect upon opening ephemeral tab.
* Bring back the bottom bar animation hidden behind ephemeral tab.
*/ */
public class EphemeralTabPanel extends OverlayPanel { public class EphemeralTabPanel extends OverlayPanel {
/** The compositor layer used for drawing the panel. */ /** The compositor layer used for drawing the panel. */
...@@ -73,12 +75,22 @@ public class EphemeralTabPanel extends OverlayPanel { ...@@ -73,12 +75,22 @@ public class EphemeralTabPanel extends OverlayPanel {
mActivity, getBarHeight()); mActivity, getBarHeight());
} }
@Override
protected float getPeekedHeight() {
return getBarHeightPeeking() * 1.5f;
}
@Override @Override
protected float getMaximizedHeight() { protected float getMaximizedHeight() {
// Max height does not cover the entire content screen. // Max height does not cover the entire content screen.
return getTabHeight() * 0.9f; return getTabHeight() * 0.9f;
} }
@Override
public boolean isPanelOpened() {
return getHeight() > getPeekedHeight();
}
@Override @Override
public float getProgressBarOpacity() { public float getProgressBarOpacity() {
return 1.0f; return 1.0f;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment