Commit 5077cce4 authored by John Lee's avatar John Lee Committed by Commit Bot

WebUI Tab Strip: Update the tab strip's slide animation

Bug: 992972
Change-Id: Ic5490f7444f7783c7874502ea0ce75cdb6ba7576
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1902237Reviewed-by: default avatarPeter Boström <pbos@chromium.org>
Commit-Queue: John Lee <johntlee@chromium.org>
Cr-Commit-Position: refs/heads/master@{#713225}
parent c7be930f
......@@ -185,6 +185,8 @@ WebUITabStripContainerView::WebUITabStripContainerView(
this,
base::Bind(&WebUITabStripContainerView::CloseContainer,
base::Unretained(this)))) {
animation_.SetTweenType(gfx::Tween::Type::FAST_OUT_SLOW_IN);
SetVisible(false);
// TODO(crbug.com/1010589) WebContents are initially assumed to be visible by
// default unless explicitly hidden. The WebContents need to be set to hidden
......@@ -268,8 +270,10 @@ void WebUITabStripContainerView::SetContainerTargetVisibility(
bool target_visible) {
if (target_visible) {
SetVisible(true);
animation_.SetSlideDuration(base::TimeDelta::FromMilliseconds(250));
animation_.Show();
} else {
animation_.SetSlideDuration(base::TimeDelta::FromMilliseconds(200));
animation_.Hide();
}
auto_closer_->set_enabled(target_visible);
......
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