| Index: ui/views/controls/button/checkbox.cc
|
| diff --git a/ui/views/controls/button/checkbox.cc b/ui/views/controls/button/checkbox.cc
|
| index 353532decc9401a1b7a5979c01b49a25c66c6988..f07b748488138b6cb4e1f5c5f9a3acb576ac8e03 100644
|
| --- a/ui/views/controls/button/checkbox.cc
|
| +++ b/ui/views/controls/button/checkbox.cc
|
| @@ -16,8 +16,8 @@
|
| #include "ui/gfx/paint_vector_icon.h"
|
| #include "ui/gfx/vector_icons_public.h"
|
| #include "ui/resources/grit/ui_resources.h"
|
| -#include "ui/views/animation/ink_drop_highlight.h"
|
| #include "ui/views/animation/ink_drop_ripple.h"
|
| +#include "ui/views/animation/square_ink_drop_ripple.h"
|
| #include "ui/views/controls/button/label_button_border.h"
|
| #include "ui/views/painter.h"
|
| #include "ui/views/resources/grit/views_resources.h"
|
| @@ -39,8 +39,6 @@ Checkbox::Checkbox(const base::string16& label)
|
| SetInkDropMode(PlatformStyle::kUseRipples ? InkDropMode::ON
|
| : InkDropMode::OFF);
|
| set_has_ink_drop_action_on_click(true);
|
| - // The "small" size is 21dp, the large size is 1.33 * 21dp = 28dp.
|
| - set_ink_drop_size(gfx::Size(21, 21));
|
| SetFocusPainter(nullptr);
|
| } else {
|
| std::unique_ptr<LabelButtonBorder> button_border(new LabelButtonBorder());
|
| @@ -165,11 +163,13 @@ void Checkbox::OnNativeThemeChanged(const ui::NativeTheme* theme) {
|
| }
|
|
|
| std::unique_ptr<InkDropRipple> Checkbox::CreateInkDropRipple() const {
|
| - return CreateDefaultInkDropRipple(image()->GetMirroredBounds().CenterPoint());
|
| -}
|
| -
|
| -std::unique_ptr<InkDropHighlight> Checkbox::CreateInkDropHighlight() const {
|
| - return nullptr;
|
| + // The "small" size is 21dp, the large size is 1.33 * 21dp = 28dp.
|
| + const gfx::Size size(21, 21);
|
| + std::unique_ptr<InkDropRipple> ripple(new SquareInkDropRipple(
|
| + CalculateLargeInkDropSize(size), kInkDropLargeCornerRadius, size,
|
| + kInkDropSmallCornerRadius, image()->GetMirroredBounds().CenterPoint(),
|
| + GetInkDropBaseColor(), ink_drop_visible_opacity()));
|
| + return ripple;
|
| }
|
|
|
| SkColor Checkbox::GetInkDropBaseColor() const {
|
|
|