Commit e40b7075 authored by minch's avatar minch Committed by Commit Bot

dark_mode: Remove kNotificationCenterCollapseIcon.

Collapse button use kUnifiedMenuExpandIcon now, remove the old one. And
update the function name from OnEnabledChanged to UpdateVectorIcon.

Bug: 1131543
Change-Id: I5d42a7941b07255da1ccc267bc5b44934dc4f492
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2486661
Commit-Queue: Min Chen <minch@chromium.org>
Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Cr-Commit-Position: refs/heads/master@{#819927}
parent 1f033c4e
......@@ -110,7 +110,6 @@ aggregate_vector_icons2("ash_vector_icons") {
"notification_capslock.icon",
"notification_center_all_done.icon",
"notification_center_clear_all.icon",
"notification_center_collapse.icon",
"notification_center_do_not_disturb_off.icon",
"notification_center_do_not_disturb_on.icon",
"notification_center_empty.icon",
......
// Copyright 2017 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
CANVAS_DIMENSIONS, 40,
MOVE_TO, 10.82f, 12,
LINE_TO, 20, 21.89f,
LINE_TO, 29.18f, 12,
LINE_TO, 32, 15.05f,
LINE_TO, 20, 28,
LINE_TO, 8, 15.05f,
CLOSE
......@@ -16,7 +16,7 @@ namespace ash {
CollapseButton::CollapseButton(views::ButtonListener* listener)
: CustomShapeButton(listener) {
OnEnabledChanged();
UpdateVectorIcon();
}
CollapseButton::~CollapseButton() = default;
......@@ -58,7 +58,7 @@ const char* CollapseButton::GetClassName() const {
return "CollapseButton";
}
void CollapseButton::OnEnabledChanged() {
void CollapseButton::UpdateVectorIcon() {
const SkColor icon_color = AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kIconColorPrimary);
SetImage(views::Button::STATE_NORMAL,
......
......@@ -29,12 +29,15 @@ class CollapseButton : public CustomShapeButton {
const char* GetClassName() const override;
private:
void OnEnabledChanged();
// Update the vector icon on initializing CollapseButton or when the |Enabled|
// property of CollapseButton changes. The vector icon will have different
// colors on the |Enabled| property.
void UpdateVectorIcon();
double expanded_amount_ = 1.0;
views::PropertyChangedSubscription enabled_changed_subscription_ =
AddEnabledChangedCallback(
base::BindRepeating(&CollapseButton::OnEnabledChanged,
base::BindRepeating(&CollapseButton::UpdateVectorIcon,
base::Unretained(this)));
DISALLOW_COPY_AND_ASSIGN(CollapseButton);
......
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