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

Unified Diff: ui/views/animation/flood_fill_ink_drop_animation.cc

Issue 1890863003: Change the bookmark ripple/hover to be 24px in height. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/flood_fill_ink_drop_animation.cc
diff --git a/ui/views/animation/flood_fill_ink_drop_animation.cc b/ui/views/animation/flood_fill_ink_drop_animation.cc
index 9cfe2414b2bfdda63d43d353070a4789735d533b..4520fb4480057334a640daa108f6da234798a28c 100644
--- a/ui/views/animation/flood_fill_ink_drop_animation.cc
+++ b/ui/views/animation/flood_fill_ink_drop_animation.cc
@@ -120,6 +120,12 @@ FloodFillInkDropAnimation::FloodFillInkDropAnimation(
root_layer_.SetMasksToBounds(true);
root_layer_.SetBounds(gfx::Rect(size_));
+ const gfx::Vector2dF translate_vector =
+ center_point_ - root_layer_.bounds().CenterPoint();
+ gfx::Transform transfrom;
+ transfrom.Translate(translate_vector.x(), translate_vector.y());
+ root_layer_.SetTransform(transfrom);
+
const int painted_size_length = 2 * std::max(size_.width(), size_.height());
painted_layer_.SetBounds(gfx::Rect(painted_size_length, painted_size_length));
@@ -307,7 +313,8 @@ gfx::Transform FloodFillInkDropAnimation::CalculateTransform(
ToRoundedPoint(circle_layer_delegate_.GetCenterPoint());
gfx::Transform transform = gfx::Transform();
- transform.Translate(center_point_.x(), center_point_.y());
+ transform.Translate(root_layer_.bounds().CenterPoint().x(),
+ root_layer_.bounds().CenterPoint().y());
transform.Scale(target_scale, target_scale);
transform.Translate(-drawn_center_point.x(), -drawn_center_point.y());
« no previous file with comments | « chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698