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

Unified Diff: chrome/browser/ui/views/toolbar/back_button.cc

Issue 1298513003: Implemented prototype for new ink drop specs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Addressed most concerns from patch set 2. Created 5 years, 4 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
Index: chrome/browser/ui/views/toolbar/back_button.cc
diff --git a/chrome/browser/ui/views/toolbar/back_button.cc b/chrome/browser/ui/views/toolbar/back_button.cc
index 73ae0411c64c06f374cbaab0be52536da6b57451..630c1fff5147b27f903b85b67c37249bb12487fb 100644
--- a/chrome/browser/ui/views/toolbar/back_button.cc
+++ b/chrome/browser/ui/views/toolbar/back_button.cc
@@ -33,8 +33,12 @@ void BackButton::SetLeadingMargin(int margin) {
}
void BackButton::LayoutInkDrop() {
- ink_drop_animation_controller()->SetInkDropBounds(
- gfx::Rect(margin_leading_, 0, width() - margin_leading_, height()));
+ ToolbarButton::LayoutInkDrop();
+ gfx::Size ink_drop_size =
+ ink_drop_animation_controller()->GetInkDropLargeSize();
+ ink_drop_animation_controller()->SetInkDropOrigin(gfx::Point(
+ margin_leading_ + (width() - margin_leading_ - ink_drop_size.width()) / 2,
+ (height() - ink_drop_size.height()) / 2));
}
const char* BackButton::GetClassName() const {

Powered by Google App Engine
This is Rietveld 408576698