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

Side by Side Diff: ui/views/animation/ink_drop_animation.cc

Issue 1682893002: Color the ink drop ripple and hover effects based on theming. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix unit tests Created 4 years, 10 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
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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/animation/ink_drop_animation.h" 5 #include "ui/views/animation/ink_drop_animation.h"
6 6
7 #include "ui/compositor/callback_layer_animation_observer.h" 7 #include "ui/compositor/callback_layer_animation_observer.h"
8 #include "ui/compositor/layer.h" 8 #include "ui/compositor/layer.h"
9 #include "ui/compositor/layer_animation_sequence.h" 9 #include "ui/compositor/layer_animation_sequence.h"
10 #include "ui/compositor/scoped_layer_animation_settings.h" 10 #include "ui/compositor/scoped_layer_animation_settings.h"
11 #include "ui/gfx/geometry/point.h" 11 #include "ui/gfx/geometry/point.h"
12 12
13 namespace views { 13 namespace views {
14 14
15 const float InkDropAnimation::kHiddenOpacity = 0.0f; 15 const float InkDropAnimation::kHiddenOpacity = 0.0f;
16 const float InkDropAnimation::kVisibleOpacity = 0.11f; 16 const float InkDropAnimation::kVisibleOpacity = 0.175f;
17 17
18 InkDropAnimation::InkDropAnimation() 18 InkDropAnimation::InkDropAnimation()
19 : destroying_(false), 19 : destroying_(false),
20 root_layer_(new ui::Layer(ui::LAYER_NOT_DRAWN)), 20 root_layer_(new ui::Layer(ui::LAYER_NOT_DRAWN)),
21 ink_drop_state_(InkDropState::HIDDEN) { 21 ink_drop_state_(InkDropState::HIDDEN) {
22 root_layer_->set_name("InkDropAnimation:ROOT_LAYER"); 22 root_layer_->set_name("InkDropAnimation:ROOT_LAYER");
23 root_layer_->SetMasksToBounds(false); 23 root_layer_->SetMasksToBounds(false);
24 24
25 SetStateToHiddenInternal(); 25 SetStateToHiddenInternal();
26 } 26 }
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
135 InkDropAnimationObserver, observers_, 135 InkDropAnimationObserver, observers_,
136 InkDropAnimationEnded(ink_drop_state, 136 InkDropAnimationEnded(ink_drop_state,
137 observer.aborted_count() 137 observer.aborted_count()
138 ? InkDropAnimationObserver::PRE_EMPTED 138 ? InkDropAnimationObserver::PRE_EMPTED
139 : InkDropAnimationObserver::SUCCESS)); 139 : InkDropAnimationObserver::SUCCESS));
140 140
141 return true; 141 return true;
142 } 142 }
143 143
144 } // namespace views 144 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698