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

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

Issue 1750403005: [MD] some tweaks to download shelf (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: explicit Created 4 years, 9 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 | « ui/views/animation/ink_drop_host_view.h ('k') | ui/views/controls/button/custom_button.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/animation/ink_drop_host_view.cc
diff --git a/ui/views/animation/ink_drop_host_view.cc b/ui/views/animation/ink_drop_host_view.cc
index bd219a01bdc26ff5bd0237e66c1624d438163ea7..77e281782dd027d0c24528343f7a468f7db9b39c 100644
--- a/ui/views/animation/ink_drop_host_view.cc
+++ b/ui/views/animation/ink_drop_host_view.cc
@@ -11,12 +11,12 @@
namespace views {
// Default sizes for ink drop effects.
-const int kInkDropLargeSize = 32;
+const int kInkDropSize = 24;
const int kInkDropLargeCornerRadius = 4;
-const int kInkDropSmallSize = 24;
const int kInkDropSmallCornerRadius = 2;
-InkDropHostView::InkDropHostView() {}
+InkDropHostView::InkDropHostView()
+ : ink_drop_size_(kInkDropSize, kInkDropSize) {}
InkDropHostView::~InkDropHostView() {}
@@ -33,18 +33,19 @@ void InkDropHostView::RemoveInkDropLayer(ui::Layer* ink_drop_layer) {
}
scoped_ptr<InkDropAnimation> InkDropHostView::CreateInkDropAnimation() const {
+ gfx::Size large_drop(ink_drop_size_.width() * 4 / 3,
+ ink_drop_size_.height() * 4 / 3);
+
scoped_ptr<InkDropAnimation> animation(new SquareInkDropAnimation(
- gfx::Size(kInkDropLargeSize, kInkDropLargeSize),
- kInkDropLargeCornerRadius,
- gfx::Size(kInkDropSmallSize, kInkDropSmallSize),
+ large_drop, kInkDropLargeCornerRadius, ink_drop_size_,
kInkDropSmallCornerRadius, GetInkDropCenter(), GetInkDropBaseColor()));
return animation;
}
scoped_ptr<InkDropHover> InkDropHostView::CreateInkDropHover() const {
- scoped_ptr<InkDropHover> hover(new InkDropHover(
- gfx::Size(kInkDropSmallSize, kInkDropSmallSize),
- kInkDropSmallCornerRadius, GetInkDropCenter(), GetInkDropBaseColor()));
+ scoped_ptr<InkDropHover> hover(
+ new InkDropHover(ink_drop_size_, kInkDropSmallCornerRadius,
+ GetInkDropCenter(), GetInkDropBaseColor()));
return hover;
}
« no previous file with comments | « ui/views/animation/ink_drop_host_view.h ('k') | ui/views/controls/button/custom_button.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698