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

Side by Side Diff: ui/views/controls/glow_hover_controller.cc

Issue 1587873004: Tone down the hover effect on mousing over background tabs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 11 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 unified diff | Download patch
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/views/controls/glow_hover_controller.h" 5 #include "ui/views/controls/glow_hover_controller.h"
6 6
7 #include "ui/views/view.h" 7 #include "ui/views/view.h"
8 8
9 namespace views { 9 namespace views {
10 10
11 // Amount to scale the opacity. 11 // Amount to scale the opacity.
12 static const double kTrackOpacityScale = 0.5; 12 static const double kTrackOpacityScale = 0.25;
13 static const double kHighlightOpacityScale = 1.0; 13 static const double kHighlightOpacityScale = 1.0;
14 14
15 // How long the hover state takes. 15 // How long the hover state takes.
16 static const int kTrackHoverDurationMs = 400; 16 static const int kTrackHoverDurationMs = 400;
17 17
18 GlowHoverController::GlowHoverController(views::View* view) 18 GlowHoverController::GlowHoverController(views::View* view)
19 : view_(view), 19 : view_(view),
20 animation_(this), 20 animation_(this),
21 opacity_scale_(kTrackOpacityScale) { 21 opacity_scale_(kTrackOpacityScale) {
22 animation_.set_delegate(this); 22 animation_.set_delegate(this);
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 void GlowHoverController::AnimationEnded(const gfx::Animation* animation) { 80 void GlowHoverController::AnimationEnded(const gfx::Animation* animation) {
81 view_->SchedulePaint(); 81 view_->SchedulePaint();
82 } 82 }
83 83
84 void GlowHoverController::AnimationProgressed(const gfx::Animation* animation) { 84 void GlowHoverController::AnimationProgressed(const gfx::Animation* animation) {
85 view_->SchedulePaint(); 85 view_->SchedulePaint();
86 } 86 }
87 87
88 } // namespace views 88 } // namespace views
OLDNEW
« no previous file with comments | « chrome/browser/ui/views/tabs/tab.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698