Commit 1fbaf06f authored by pkotwicz@chromium.org's avatar pkotwicz@chromium.org

Fix the "throb" animation for the immersive fullscreen light bars

- This CL darkens the light bars when they are throbbing. Previously, the light bars for inactive tabs would animate from 0 - 33% opacity.
- This CL ignores the mini tab title animation for immersive fullscreen tabs. Previously, the inactive mini tabs would be completely transparent while the animation was running.

BUG=265553
TEST=Manual, see bug
R=jamescook
TBR=sky

Review URL: https://chromiumcodereview.appspot.com/22353017

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@216774 0039d316-1c4b-4281-b951-d872f2087c98
parent aa705e0e
......@@ -238,6 +238,10 @@ const int kImmersiveBarHeight = 2;
const SkColor kImmersiveActiveTabColor = SkColorSetRGB(235, 235, 235);
const SkColor kImmersiveInactiveTabColor = SkColorSetRGB(190, 190, 190);
// The minimum opacity (out of 1) when a tab (either active or inactive) is
// throbbing in the immersive mode light strip.
const double kImmersiveTabMinThrobOpacity = 0.66;
// Number of steps in the immersive mode loading animation.
const int kImmersiveLoadingStepCount = 32;
......@@ -1115,9 +1119,13 @@ void Tab::PaintTab(gfx::Canvas* canvas) {
void Tab::PaintImmersiveTab(gfx::Canvas* canvas) {
// Use transparency for the draw-attention animation.
int alpha = (tab_animation_ && tab_animation_->is_animating())
? static_cast<int>(GetThrobValue() * 255)
: 255;
int alpha = 255;
if (tab_animation_ &&
tab_animation_->is_animating() &&
!data().mini) {
alpha = tab_animation_->CurrentValueBetween(
255, static_cast<int>(255 * kImmersiveTabMinThrobOpacity));
}
// Draw a gray rectangle to represent the tab. This works for mini-tabs as
// well as regular ones. The active tab has a brigher bar.
......
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