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

Unified Diff: chrome/browser/ui/views/bookmarks/bookmark_bar_view.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 | « no previous file | ui/views/animation/flood_fill_ink_drop_animation.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
index b0b3b9a0251acb1890ff50b13ff26df250e4cf9d..23adb22f284ff1fab111fb32ade2b41d8e1af1c7 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bar_view.cc
@@ -189,6 +189,12 @@ int GetHorizontalMargin() {
return kHorizontalMargin[ui::MaterialDesignController::GetMode()];
}
+gfx::Size CalculateInkDropSize(const gfx::Size& button_size) {
+ gfx::Size ink_drop_size(button_size);
+ ink_drop_size.Enlarge(0, -2);
+ return ink_drop_size;
+}
+
// BookmarkButtonBase -----------------------------------------------
// Base class for non-menu hosting buttons used on the bookmark bar.
@@ -234,14 +240,16 @@ class BookmarkButtonBase : public views::LabelButton {
std::unique_ptr<views::InkDropAnimation> CreateInkDropAnimation()
const override {
return base::WrapUnique(new views::FloodFillInkDropAnimation(
- size(), GetInkDropCenter(), GetInkDropBaseColor()));
+ CalculateInkDropSize(size()), GetInkDropCenter(),
+ GetInkDropBaseColor()));
}
std::unique_ptr<views::InkDropHover> CreateInkDropHover() const override {
if (!ShouldShowInkDropHover())
return nullptr;
- return base::WrapUnique(new views::InkDropHover(
- size(), 0, GetInkDropCenter(), GetInkDropBaseColor()));
+ return base::WrapUnique(
+ new views::InkDropHover(CalculateInkDropSize(size()), 0,
+ GetInkDropCenter(), GetInkDropBaseColor()));
}
SkColor GetInkDropBaseColor() const override {
@@ -333,14 +341,16 @@ class BookmarkMenuButtonBase : public views::MenuButton {
std::unique_ptr<views::InkDropAnimation> CreateInkDropAnimation()
const override {
return base::WrapUnique(new views::FloodFillInkDropAnimation(
- size(), GetInkDropCenter(), GetInkDropBaseColor()));
+ CalculateInkDropSize(size()), GetInkDropCenter(),
+ GetInkDropBaseColor()));
}
std::unique_ptr<views::InkDropHover> CreateInkDropHover() const override {
if (!ShouldShowInkDropHover())
return nullptr;
- return base::WrapUnique(new views::InkDropHover(
- size(), 0, GetInkDropCenter(), GetInkDropBaseColor()));
+ return base::WrapUnique(
+ new views::InkDropHover(CalculateInkDropSize(size()), 0,
+ GetInkDropCenter(), GetInkDropBaseColor()));
}
SkColor GetInkDropBaseColor() const override {
« no previous file with comments | « no previous file | ui/views/animation/flood_fill_ink_drop_animation.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698