Index: ash/common/system/tray/system_menu_button.cc |
diff --git a/ash/common/system/tray/system_menu_button.cc b/ash/common/system/tray/system_menu_button.cc |
index 5931b24ecf99bf9a96afd8bb4b431b79d91e120a..4c6579ad7a77c18109e8af866e27aa60d07a5009 100644 |
--- a/ash/common/system/tray/system_menu_button.cc |
+++ b/ash/common/system/tray/system_menu_button.cc |
@@ -11,6 +11,7 @@ |
#include "ui/gfx/paint_vector_icon.h" |
#include "ui/views/animation/flood_fill_ink_drop_ripple.h" |
#include "ui/views/animation/ink_drop_highlight.h" |
+#include "ui/views/animation/ink_drop_impl.h" |
#include "ui/views/animation/square_ink_drop_ripple.h" |
#include "ui/views/border.h" |
#include "ui/views/painter.h" |
@@ -30,9 +31,8 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener, |
const int horizontal_padding = (kMenuButtonSize - image.width()) / 2; |
const int vertical_padding = (kMenuButtonSize - image.height()) / 2; |
- SetBorder( |
- views::Border::CreateEmptyBorder(vertical_padding, horizontal_padding, |
- vertical_padding, horizontal_padding)); |
+ SetBorder(views::CreateEmptyBorder(vertical_padding, horizontal_padding, |
+ vertical_padding, horizontal_padding)); |
SetTooltipText(l10n_util::GetStringUTF16(accessible_name_id)); |
@@ -50,6 +50,13 @@ SystemMenuButton::SystemMenuButton(views::ButtonListener* listener, |
SystemMenuButton::~SystemMenuButton() {} |
+std::unique_ptr<views::InkDrop> SystemMenuButton::CreateInkDrop() { |
+ std::unique_ptr<views::InkDropImpl> ink_drop = |
+ CreateDefaultFloodFillInkDropImpl(); |
+ ink_drop->SetShowHighlightOnHover(false); |
+ return std::move(ink_drop); |
+} |
+ |
std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple() |
const { |
const gfx::Size size = GetInkDropSize(); |
@@ -73,11 +80,6 @@ std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple() |
std::unique_ptr<views::InkDropHighlight> |
SystemMenuButton::CreateInkDropHighlight() const { |
- // TODO(bruthig): Show the highlight when the ink drop is active. (See |
- // crbug.com/649734) |
- if (!ShouldShowInkDropHighlight()) |
- return nullptr; |
- |
int highlight_radius = 0; |
switch (ink_drop_style_) { |
case InkDropStyle::SQUARE: |
@@ -96,10 +98,6 @@ SystemMenuButton::CreateInkDropHighlight() const { |
return highlight; |
} |
-bool SystemMenuButton::ShouldShowInkDropHighlight() const { |
- return false; |
-} |
- |
gfx::Size SystemMenuButton::GetInkDropSize() const { |
gfx::Rect bounds = GetLocalBounds(); |
bounds.Inset(kTrayPopupInkDropInset, kTrayPopupInkDropInset); |