Chromium Code Reviews| Index: ui/views/animation/ink_drop_hover.cc |
| diff --git a/ui/views/animation/ink_drop_hover.cc b/ui/views/animation/ink_drop_hover.cc |
| index 439ee24f444f45df3e4935032f29bc3620eb5662..27becb67fc380857b864d6da0dac8c9311d9bb90 100644 |
| --- a/ui/views/animation/ink_drop_hover.cc |
| +++ b/ui/views/animation/ink_drop_hover.cc |
| @@ -16,19 +16,18 @@ namespace views { |
| namespace { |
| // The opacity of the hover when it is visible. |
| -const float kHoverVisibleOpacity = 0.08f; |
|
Evan Stade
2016/02/09 20:39:28
I used algebra for these conversions
bruthig
2016/02/09 21:01:06
Do you think we'll have to parameterize these in t
Evan Stade
2016/02/09 22:54:28
no
|
| +const float kHoverVisibleOpacity = 0.128f; |
| // The opacity of the hover when it is not visible. |
| const float kHiddenOpacity = 0.0f; |
| -// The hover color. |
| -const SkColor kHoverColor = SK_ColorBLACK; |
| - |
| } // namespace |
| -InkDropHover::InkDropHover(const gfx::Size& size, int corner_radius) |
| +InkDropHover::InkDropHover(SkColor color, |
| + const gfx::Size& size, |
| + int corner_radius) |
| : layer_delegate_( |
| - new RoundedRectangleLayerDelegate(kHoverColor, size, corner_radius)), |
| + new RoundedRectangleLayerDelegate(color, size, corner_radius)), |
| layer_(new ui::Layer()) { |
| layer_->SetBounds(gfx::Rect(size)); |
| layer_->SetFillsBoundsOpaquely(false); |
| @@ -83,6 +82,10 @@ void InkDropHover::AnimateFade(HoverAnimationType animation_type, |
| animation_observer->SetActive(); |
| } |
| +SkColor InkDropHover::GetColor() const { |
| + return layer_delegate_->color(); |
| +} |
| + |
| void InkDropHover::SetCenterPoint(const gfx::Point& center_point) { |
| gfx::Transform transform; |
| transform.Translate(center_point.x() - layer_->bounds().CenterPoint().x(), |