| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ash/common/system/tray/system_menu_button.h" | 5 #include "ash/common/system/tray/system_menu_button.h" |
| 6 | 6 |
| 7 #include "ash/common/ash_constants.h" | 7 #include "ash/common/ash_constants.h" |
| 8 #include "ash/common/system/tray/system_tray.h" | 8 #include "ash/common/system/tray/system_tray.h" |
| 9 #include "ash/common/system/tray/tray_constants.h" | 9 #include "ash/common/system/tray/tray_constants.h" |
| 10 #include "ui/base/l10n/l10n_util.h" | 10 #include "ui/base/l10n/l10n_util.h" |
| (...skipping 20 matching lines...) Expand all Loading... |
| 31 SetTooltipText(l10n_util::GetStringUTF16(accessible_name_id)); | 31 SetTooltipText(l10n_util::GetStringUTF16(accessible_name_id)); |
| 32 | 32 |
| 33 // TODO(tdanderson): Update the focus rect color, border thickness, and | 33 // TODO(tdanderson): Update the focus rect color, border thickness, and |
| 34 // location for material design. | 34 // location for material design. |
| 35 SetFocusForPlatform(); | 35 SetFocusForPlatform(); |
| 36 SetFocusPainter(views::Painter::CreateSolidFocusPainter( | 36 SetFocusPainter(views::Painter::CreateSolidFocusPainter( |
| 37 kFocusBorderColor, gfx::Insets(1, 1, 1, 1))); | 37 kFocusBorderColor, gfx::Insets(1, 1, 1, 1))); |
| 38 | 38 |
| 39 SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER); | 39 SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER); |
| 40 set_has_ink_drop_action_on_click(true); | 40 set_has_ink_drop_action_on_click(true); |
| 41 set_ink_drop_base_color(kMenuIconColor); | 41 set_ink_drop_base_color(SK_ColorBLACK); |
| 42 } | 42 } |
| 43 | 43 |
| 44 SystemMenuButton::~SystemMenuButton() {} | 44 SystemMenuButton::~SystemMenuButton() {} |
| 45 | 45 |
| 46 std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple() | 46 std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple() |
| 47 const { | 47 const { |
| 48 return base::MakeUnique<views::FloodFillInkDropRipple>( | 48 return base::MakeUnique<views::FloodFillInkDropRipple>( |
| 49 GetLocalBounds(), GetInkDropCenterBasedOnLastEvent(), | 49 GetLocalBounds(), GetInkDropCenterBasedOnLastEvent(), |
| 50 GetInkDropBaseColor(), ink_drop_visible_opacity()); | 50 GetInkDropBaseColor(), ink_drop_visible_opacity()); |
| 51 } | 51 } |
| 52 | 52 |
| 53 std::unique_ptr<views::InkDropHighlight> | 53 std::unique_ptr<views::InkDropHighlight> |
| 54 SystemMenuButton::CreateInkDropHighlight() const { | 54 SystemMenuButton::CreateInkDropHighlight() const { |
| 55 gfx::Size size = GetLocalBounds().size(); | 55 return nullptr; |
| 56 return base::MakeUnique<views::InkDropHighlight>( | |
| 57 size, kInkDropSmallCornerRadius, | |
| 58 gfx::RectF(gfx::SizeF(size)).CenterPoint(), kMenuIconColor); | |
| 59 } | 56 } |
| 60 | 57 |
| 61 bool SystemMenuButton::ShouldShowInkDropForFocus() const { | 58 bool SystemMenuButton::ShouldShowInkDropForFocus() const { |
| 62 return false; | 59 return false; |
| 63 } | 60 } |
| 64 | 61 |
| 65 } // namespace ash | 62 } // namespace ash |
| OLD | NEW |