Commit 0360779c authored by minch's avatar minch Committed by Commit Bot

dark_mode: Simplify the logic to get ripple attributes.

Color of the ripple is no longer the opposite color of the background
color, but either WHITE or BLACK based on the current color mode now.

- Update AshColorProvider::GetRippleAttributes with default value to
  simplify most of the call sites. The default background color is
  GetBackgroundColor() for Shield and Base layer.
- Hard code the logic of notification related, which will not going to
  support dark mode at the first stage.
- Clean up. Removed some unnecessary functions and arguments.

Bug: 1107056
Change-Id: I1adb4232f66c5433eb52920ac5b48c329ade35f6
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2427623
Commit-Queue: Min Chen <minch@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#810534}
parent e4efe767
......@@ -181,9 +181,6 @@ class ASH_EXPORT ShelfConfig : public TabletModeObserver,
bool in_overview_mode() const { return overview_mode_; }
// Ink drop RippleAttributes for shelf items.
AshColorProvider::RippleAttributes GetInkDropRippleAttributes() const;
// Gets the current color for the shelf control buttons.
SkColor GetShelfControlButtonColor() const;
......
......@@ -186,7 +186,7 @@ class LoginShelfButton : public views::LabelButton {
SetInkDropMode(InkDropMode::ON);
SetHasInkDropActionOnClick(true);
AshColorProvider::RippleAttributes ripple_attributes =
ShelfConfig::Get()->GetInkDropRippleAttributes();
AshColorProvider::Get()->GetRippleAttributes();
SetInkDropBaseColor(ripple_attributes.base_color);
SetInkDropVisibleOpacity(ripple_attributes.inkdrop_opacity);
......@@ -308,7 +308,7 @@ class KioskAppsButton : public views::MenuButton,
SetInkDropMode(InkDropMode::ON);
SetHasInkDropActionOnClick(true);
AshColorProvider::RippleAttributes ripple_attributes =
ShelfConfig::Get()->GetInkDropRippleAttributes();
AshColorProvider::Get()->GetRippleAttributes();
SetInkDropBaseColor(ripple_attributes.base_color);
SetInkDropVisibleOpacity(ripple_attributes.inkdrop_opacity);
......
......@@ -8,6 +8,7 @@
#include "ash/public/cpp/shelf_config.h"
#include "ash/shelf/shelf.h"
#include "ash/shelf/shelf_button_delegate.h"
#include "ash/style/ash_color_provider.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/views/animation/ink_drop_impl.h"
......@@ -22,7 +23,7 @@ ShelfButton::ShelfButton(Shelf* shelf,
DCHECK(shelf_button_delegate_);
SetHideInkDropWhenShowingContextMenu(false);
AshColorProvider::RippleAttributes ripple_attributes =
ShelfConfig::Get()->GetInkDropRippleAttributes();
AshColorProvider::Get()->GetRippleAttributes();
SetInkDropBaseColor(ripple_attributes.base_color);
SetInkDropVisibleOpacity(ripple_attributes.inkdrop_opacity);
SetFocusBehavior(FocusBehavior::ALWAYS);
......
......@@ -444,11 +444,6 @@ int ShelfConfig::GetShelfSize(bool ignore_in_app_state) const {
return is_dense_ ? 48 : 56;
}
AshColorProvider::RippleAttributes ShelfConfig::GetInkDropRippleAttributes()
const {
return AshColorProvider::Get()->GetRippleAttributes(GetDefaultShelfColor());
}
SkColor ShelfConfig::GetShelfControlButtonColor() const {
const session_manager::SessionState session_state =
Shell::Get()->session_controller()->GetSessionState();
......
......@@ -230,13 +230,11 @@ ShelfWidget::DelegateView::DelegateView(ShelfWidget* shelf_widget, Shelf* shelf)
ShowAnimatingBackground(false);
animating_background_.SetColor(ShelfConfig::Get()->GetMaximizedShelfColor());
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(
ShelfConfig::Get()->GetDefaultShelfColor());
drag_handle_ = AddChildView(
std::make_unique<DragHandle>(kDragHandleCornerRadius, shelf));
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes();
animating_drag_handle_.SetColor(ripple_attributes.base_color);
animating_drag_handle_.SetOpacity(ripple_attributes.inkdrop_opacity + 0.075);
animating_drag_handle_.SetRoundedCornerRadius(
......
......@@ -231,6 +231,9 @@ SkColor AshColorProvider::GetContentLayerColor(ContentLayerType type) const {
AshColorProvider::RippleAttributes AshColorProvider::GetRippleAttributes(
SkColor bg_color) const {
if (bg_color == gfx::kPlaceholderColor)
bg_color = GetBackgroundColor();
const bool is_dark = color_utils::IsDark(bg_color);
const SkColor base_color = is_dark ? SK_ColorWHITE : SK_ColorBLACK;
const float opacity =
......
......@@ -9,6 +9,7 @@
#include "ash/public/cpp/session/session_observer.h"
#include "base/observer_list.h"
#include "third_party/skia/include/core/SkColor.h"
#include "ui/gfx/color_palette.h"
#include "ui/gfx/vector_icon_types.h"
class PrefChangeRegistrar;
......@@ -167,8 +168,12 @@ class ASH_EXPORT AshColorProvider : public SessionObserver {
SkColor GetContentLayerColor(ContentLayerType type) const;
// Gets the attributes of ripple on |bg_color|. |bg_color| is the background
// color of the UI element that wants to show inkdrop.
RippleAttributes GetRippleAttributes(SkColor bg_color) const;
// color of the UI element that wants to show inkdrop. Applies the color from
// GetBackgroundColor if |bg_color| is not given. This means the background
// color of the UI element is from Shiled or Base layer. See
// GetShieldLayerColor and GetBaseLayerColor.
RippleAttributes GetRippleAttributes(
SkColor bg_color = gfx::kPlaceholderColor) const;
// Gets the background color that can be applied on any layer. The returned
// color will be different based on color mode and color theme (see
......
......@@ -12,7 +12,6 @@
#include "ash/system/accessibility/autoclick_menu_bubble_controller.h"
#include "ash/system/unified/custom_shape_button.h"
#include "ash/system/unified/top_shortcut_button.h"
#include "ash/system/unified/unified_system_tray_view.h"
#include "base/macros.h"
#include "base/metrics/user_metrics.h"
#include "base/timer/timer.h"
......@@ -38,8 +37,7 @@ constexpr int kScrollPadIconPadding = 30;
SkColor HoveredButtonColor() {
const AshColorProvider::RippleAttributes attributes =
AshColorProvider::Get()->GetRippleAttributes(
UnifiedSystemTrayView::GetBackgroundColor());
AshColorProvider::Get()->GetRippleAttributes();
return SkColorSetA(attributes.base_color, 255 * attributes.highlight_opacity);
}
......
......@@ -112,15 +112,12 @@ class MoreButton : public views::Button {
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
const override {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
const char* GetClassName() const override { return "MoreButton"; }
......
......@@ -15,7 +15,6 @@
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_popup_item_style.h"
#include "ash/system/tray/tray_popup_utils.h"
#include "ash/system/unified/unified_system_tray_view.h"
#include "ash/system/user/rounded_image_view.h"
#include "ui/base/dragdrop/drag_drop_types.h"
#include "ui/gfx/paint_vector_icon.h"
......@@ -52,14 +51,15 @@ HoldingSpaceItemChipView::HoldingSpaceItemChipView(
AddPinButton();
const auto* color_provider = AshColorProvider::Get();
SetBackground(views::CreateRoundedRectBackground(
AshColorProvider::Get()->GetControlsLayerColor(
color_provider->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive),
kHoldingSpaceCornerRadius));
SetInkDropMode(InkDropMode::ON_NO_GESTURE_HANDLER);
SetInkDropVisibleOpacity(
ShelfConfig::Get()->GetInkDropRippleAttributes().inkdrop_opacity);
color_provider->GetRippleAttributes().inkdrop_opacity);
SetNotifyEnterExitOnChild(true);
// Subscribe to be notified of changes to `item_`'s image.
......
......@@ -7,6 +7,7 @@
#include "ash/public/cpp/holding_space/holding_space_constants.h"
#include "ash/public/cpp/holding_space/holding_space_item.h"
#include "ash/public/cpp/shelf_config.h"
#include "ash/style/ash_color_provider.h"
#include "ash/system/holding_space/holding_space_item_view_delegate.h"
#include "ui/base/class_property.h"
#include "ui/gfx/color_palette.h"
......@@ -70,7 +71,7 @@ HoldingSpaceItemView* HoldingSpaceItemView::Cast(views::View* view) {
}
SkColor HoldingSpaceItemView::GetInkDropBaseColor() const {
return ShelfConfig::Get()->GetInkDropRippleAttributes().base_color;
return AshColorProvider::Get()->GetRippleAttributes().base_color;
}
void HoldingSpaceItemView::OnGestureEvent(ui::GestureEvent* event) {
......
......@@ -22,6 +22,8 @@ constexpr SkColor kCountLabelColor = gfx::kGoogleGrey900;
constexpr SkColor kSeperatorColor = SkColorSetA(SK_ColorBLACK, 0x24); // 14%
constexpr SkColor kNotificationBackgroundColor = SK_ColorWHITE;
constexpr SkColor kUnifiedMenuButtonColorActive = gfx::kGoogleBlueDark600;
constexpr SkColor kInkRippleColor = SK_ColorBLACK;
constexpr float kInkRippleOpacity = 0.06f;
constexpr int kEmptyIconSize = 24;
constexpr gfx::Insets kEmptyIconPadding(0, 0, 4, 0);
......
......@@ -83,20 +83,21 @@ class StackingBarLabelButton : public views::LabelButton {
}
std::unique_ptr<views::InkDropRipple> CreateInkDropRipple() const override {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
GetInkDropCenterBasedOnLastEvent(), background_color_);
return std::make_unique<views::FloodFillInkDropRipple>(
size(), GetInkDropCenterBasedOnLastEvent(),
message_center_style::kInkRippleColor,
message_center_style::kInkRippleOpacity);
}
std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight()
const override {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::FILL_BOUNDS, this, background_color_);
auto highlight = std::make_unique<views::InkDropHighlight>(
gfx::SizeF(size()), message_center_style::kInkRippleColor);
highlight->set_visible_opacity(message_center_style::kInkRippleOpacity);
return highlight;
}
private:
SkColor background_color_ =
message_center_style::kNotificationBackgroundColor;
UnifiedMessageCenterView* message_center_view_;
DISALLOW_COPY_AND_ASSIGN(StackingBarLabelButton);
};
......
......@@ -111,14 +111,12 @@ class ToastOverlay::ToastDisplayObserver : public display::DisplayObserver {
class ToastOverlayButton : public views::LabelButton {
public:
ToastOverlayButton(views::ButtonListener* listener,
const base::string16& text,
const SkColor toast_backgrond_color)
const base::string16& text)
: views::LabelButton(listener, text, CONTEXT_TOAST_OVERLAY) {
SetInkDropMode(InkDropMode::ON);
SetHasInkDropActionOnClick(true);
const auto* color_provider = AshColorProvider::Get();
SetInkDropBaseColor(
color_provider->GetRippleAttributes(toast_backgrond_color).base_color);
SetInkDropBaseColor(color_provider->GetRippleAttributes().base_color);
SetEnabledTextColors(color_provider->GetContentLayerColor(
AshColorProvider::ContentLayerType::kButtonLabelColorBlue));
......@@ -158,9 +156,9 @@ class ToastOverlayView : public views::View, public views::ButtonListener {
const base::Optional<base::string16>& dismiss_text)
: overlay_(overlay) {
SetPaintToLayer();
background_color_ = AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent80);
SetBackground(views::CreateSolidBackground(background_color_));
SetBackground(
views::CreateSolidBackground(AshColorProvider::Get()->GetBaseLayerColor(
AshColorProvider::BaseLayerType::kTransparent80)));
layer()->SetFillsBoundsOpaquely(false);
layer()->SetRoundedCornerRadius(gfx::RoundedCornersF(kToastCornerRounding));
layer()->SetBackgroundBlur(
......@@ -177,11 +175,9 @@ class ToastOverlayView : public views::View, public views::ButtonListener {
return;
button_ = new ToastOverlayButton(
this,
dismiss_text.value().empty()
? l10n_util::GetStringUTF16(IDS_ASH_TOAST_DISMISS_BUTTON)
: dismiss_text.value(),
background_color_);
this, dismiss_text.value().empty()
? l10n_util::GetStringUTF16(IDS_ASH_TOAST_DISMISS_BUTTON)
: dismiss_text.value());
const int button_width =
std::min(button_->GetPreferredSize().width(), kToastButtonMaximumWidth);
......@@ -215,7 +211,6 @@ class ToastOverlayView : public views::View, public views::ButtonListener {
ToastOverlay* overlay_ = nullptr; // weak
ToastOverlayButton* button_ = nullptr; // weak
SkColor background_color_ = gfx::kPlaceholderColor;
DISALLOW_COPY_AND_ASSIGN(ToastOverlayView);
};
......
......@@ -5,7 +5,6 @@
#include "ash/system/tray/actionable_view.h"
#include "ash/system/tray/tray_popup_utils.h"
#include "ash/system/unified/unified_system_tray_view.h"
#include "ui/accessibility/ax_enums.mojom.h"
#include "ui/accessibility/ax_node_data.h"
#include "ui/events/keycodes/keyboard_codes.h"
......@@ -72,14 +71,12 @@ std::unique_ptr<views::InkDrop> ActionableView::CreateInkDrop() {
std::unique_ptr<views::InkDropRipple> ActionableView::CreateInkDropRipple()
const {
return TrayPopupUtils::CreateInkDropRipple(
ink_drop_style_, this, GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
ink_drop_style_, this, GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight>
ActionableView::CreateInkDropHighlight() const {
return TrayPopupUtils::CreateInkDropHighlight(
ink_drop_style_, this, UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
void ActionableView::ButtonPressed(Button* sender, const ui::Event& event) {
......
......@@ -9,7 +9,6 @@
#include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_popup_ink_drop_style.h"
#include "ash/system/tray/tray_popup_utils.h"
#include "ash/system/unified/unified_system_tray_view.h"
#include "ui/base/l10n/l10n_util.h"
#include "ui/gfx/paint_vector_icon.h"
#include "ui/views/animation/flood_fill_ink_drop_ripple.h"
......@@ -71,15 +70,12 @@ std::unique_ptr<views::InkDropRipple> SystemMenuButton::CreateInkDropRipple()
const {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::HOST_CENTERED, this,
GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight>
SystemMenuButton::CreateInkDropHighlight() const {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::HOST_CENTERED, this,
UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
const char* SystemMenuButton::GetClassName() const {
......
......@@ -161,7 +161,7 @@ TrayBackgroundView::TrayBackgroundView(Shelf* shelf)
DCHECK(shelf_);
SetNotifyEnterExitOnChild(true);
AshColorProvider::RippleAttributes ripple_attributes =
ShelfConfig::Get()->GetInkDropRippleAttributes();
AshColorProvider::Get()->GetRippleAttributes();
SetInkDropBaseColor(ripple_attributes.base_color);
SetInkDropVisibleOpacity(ripple_attributes.inkdrop_opacity);
......@@ -314,8 +314,7 @@ void TrayBackgroundView::ChildPreferredSizeChanged(views::View* child) {
std::unique_ptr<views::InkDropRipple> TrayBackgroundView::CreateInkDropRipple()
const {
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(
ShelfConfig::Get()->GetDefaultShelfColor());
AshColorProvider::Get()->GetRippleAttributes();
return std::make_unique<views::FloodFillInkDropRipple>(
size(), GetBackgroundInsets(), GetInkDropCenterBasedOnLastEvent(),
ripple_attributes.base_color, ripple_attributes.inkdrop_opacity);
......@@ -334,8 +333,7 @@ TrayBackgroundView::CreateInkDropHighlight() const {
bounds.set_width(bounds.width() + 2 * icon_size);
bounds.set_height(bounds.height() + 2 * icon_size);
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(
ShelfConfig::Get()->GetDefaultShelfColor());
AshColorProvider::Get()->GetRippleAttributes();
auto highlight = std::make_unique<views::InkDropHighlight>(
gfx::SizeF(bounds.size()), ripple_attributes.base_color);
highlight->set_visible_opacity(ripple_attributes.highlight_opacity);
......
......@@ -300,21 +300,18 @@ std::unique_ptr<views::InkDrop> TrayPopupUtils::CreateInkDrop(
std::unique_ptr<views::InkDropRipple> TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle ink_drop_style,
const views::View* host,
const gfx::Point& center_point,
SkColor background_color) {
const gfx::Point& center_point) {
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(background_color);
AshColorProvider::Get()->GetRippleAttributes();
return std::make_unique<views::FloodFillInkDropRipple>(
host->size(), GetInkDropInsets(ink_drop_style), center_point,
ripple_attributes.base_color, ripple_attributes.inkdrop_opacity);
}
std::unique_ptr<views::InkDropHighlight> TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle ink_drop_style,
const views::View* host,
SkColor background_color) {
const views::View* host) {
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(background_color);
AshColorProvider::Get()->GetRippleAttributes();
auto highlight = std::make_unique<views::InkDropHighlight>(
gfx::SizeF(host->size()), ripple_attributes.base_color);
highlight->set_visible_opacity(ripple_attributes.highlight_opacity);
......
......@@ -152,18 +152,14 @@ class TrayPopupUtils {
static std::unique_ptr<views::InkDropRipple> CreateInkDropRipple(
TrayPopupInkDropStyle ink_drop_style,
const views::View* host,
const gfx::Point& center_point,
SkColor background_color);
const gfx::Point& center_point);
// Creates in InkDropHighlight instance for |host| according to the
// |ink_drop_style|.
// Creates in InkDropHighlight instance for |host|.
//
// All targetable views in the system menu should delegate
// InkDropHost::CreateInkDropHighlight() calls here.
static std::unique_ptr<views::InkDropHighlight> CreateInkDropHighlight(
TrayPopupInkDropStyle ink_drop_style,
const views::View* host,
SkColor background_color);
const views::View* host);
// Installs a HighlightPathGenerator matching the TrayPopupInkDropStyle.
static void InstallHighlightPathGenerator(
......
......@@ -58,15 +58,12 @@ std::unique_ptr<views::InkDropRipple> CustomShapeButton::CreateInkDropRipple()
const {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight>
CustomShapeButton::CreateInkDropHighlight() const {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
const char* CustomShapeButton::GetClassName() const {
......
......@@ -147,15 +147,12 @@ std::unique_ptr<views::InkDropRipple>
FeaturePodIconButton::CreateInkDropRipple() const {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight>
FeaturePodIconButton::CreateInkDropHighlight() const {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
void FeaturePodIconButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
......@@ -268,15 +265,12 @@ std::unique_ptr<views::InkDropRipple>
FeaturePodLabelButton::CreateInkDropRipple() const {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight>
FeaturePodLabelButton::CreateInkDropHighlight() const {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
const char* FeaturePodLabelButton::GetClassName() const {
......
......@@ -13,7 +13,6 @@
#include "ash/style/ash_color_provider.h"
#include "ash/system/tray/tray_popup_utils.h"
#include "ash/system/unified/unified_system_tray_controller.h"
#include "ash/system/unified/unified_system_tray_view.h"
#include "base/i18n/number_formatting.h"
#include "base/macros.h"
#include "base/metrics/histogram_macros.h"
......@@ -54,8 +53,7 @@ class PageIndicatorView::PageIndicatorButton : public views::Button,
SetInkDropMode(InkDropMode::ON);
const AshColorProvider::RippleAttributes ripple_attributes =
AshColorProvider::Get()->GetRippleAttributes(
UnifiedSystemTrayView::GetBackgroundColor());
AshColorProvider::Get()->GetRippleAttributes();
ripple_base_color_ = ripple_attributes.base_color;
highlight_opacity_ = ripple_attributes.highlight_opacity;
inkdrop_opacity_ = ripple_attributes.inkdrop_opacity;
......
......@@ -65,15 +65,12 @@ std::unique_ptr<views::InkDropRipple> RoundedLabelButton::CreateInkDropRipple()
const {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight>
RoundedLabelButton::CreateInkDropHighlight() const {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
const char* RoundedLabelButton::GetClassName() const {
......
......@@ -89,15 +89,12 @@ std::unique_ptr<views::InkDropRipple> TopShortcutButton::CreateInkDropRipple()
const {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight>
TopShortcutButton::CreateInkDropHighlight() const {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
const char* TopShortcutButton::GetClassName() const {
......
......@@ -149,15 +149,12 @@ std::unique_ptr<views::InkDropRipple> UnifiedSliderButton::CreateInkDropRipple()
const {
return TrayPopupUtils::CreateInkDropRipple(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
GetInkDropCenterBasedOnLastEvent(),
UnifiedSystemTrayView::GetBackgroundColor());
GetInkDropCenterBasedOnLastEvent());
}
std::unique_ptr<views::InkDropHighlight>
UnifiedSliderButton::CreateInkDropHighlight() const {
return TrayPopupUtils::CreateInkDropHighlight(
TrayPopupInkDropStyle::FILL_BOUNDS, this,
UnifiedSystemTrayView::GetBackgroundColor());
return TrayPopupUtils::CreateInkDropHighlight(this);
}
void UnifiedSliderButton::GetAccessibleNodeData(ui::AXNodeData* node_data) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment