Commit fc7c1bd5 authored by Ahmed Mehfooz's avatar Ahmed Mehfooz Committed by Commit Bot

Remove deprecated button color and bring button background color up to spec

Bug: 1110760
Change-Id: I1d1274b724d1c6a7f2e265754d85d7abd11f3116
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2399829Reviewed-by: default avatarTim Song <tengs@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Ahmed Mehfooz <amehfooz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#805433}
parent 7bb7d6d6
......@@ -21,8 +21,6 @@ constexpr SkColor kUnifiedMenuBackgroundColorWithBlur =
SkColorSetA(kUnifiedMenuBackgroundColor, 0x99); // 60%
constexpr SkColor kNotificationBackgroundColor = SK_ColorWHITE;
constexpr SkColor kUnifiedMenuButtonColor =
SkColorSetA(gfx::kGoogleGrey200, 0x14);
constexpr SkColor kUnifiedMenuButtonColorActive = gfx::kGoogleBlueDark600;
constexpr SkColor kProminentIconButtonColor = gfx::kGoogleGreen700;
......
......@@ -100,9 +100,8 @@ class MoreButton : public views::Button {
gfx::RectF rect(GetContentsBounds());
cc::PaintFlags flags;
flags.setAntiAlias(true);
flags.setColor(AshColorProvider::Get()->DeprecatedGetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive,
kUnifiedMenuButtonColor));
flags.setColor(AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive));
flags.setStyle(cc::PaintFlags::kFill_Style);
canvas->DrawRoundRect(rect, kTrayItemCornerRadius, flags);
}
......
......@@ -77,10 +77,8 @@ const char* CustomShapeButton::GetClassName() const {
void CustomShapeButton::PaintCustomShapePath(gfx::Canvas* canvas) {
cc::PaintFlags flags;
flags.setAntiAlias(true);
const SkColor button_color =
AshColorProvider::Get()->DeprecatedGetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive,
kUnifiedMenuButtonColor);
const SkColor button_color = AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive);
flags.setColor(GetEnabled()
? button_color
: AshColorProvider::GetDisabledColor(button_color));
......
......@@ -49,10 +49,9 @@ NotificationHiddenView::NotificationHiddenView() {
auto* container = new views::View;
container->SetBackground(views::CreateBackgroundFromPainter(
views::Painter::CreateSolidRoundRectPainter(
AshColorProvider::Get()->DeprecatedGetControlsLayerColor(
AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::
kControlBackgroundColorInactive,
kUnifiedMenuButtonColor),
kControlBackgroundColorInactive),
kUnifiedTrayCornerRadius)));
auto* layout = container->SetLayoutManager(std::make_unique<views::BoxLayout>(
......
......@@ -50,9 +50,8 @@ void RoundedLabelButton::PaintButtonContents(gfx::Canvas* canvas) {
gfx::RectF rect(GetContentsBounds());
cc::PaintFlags flags;
flags.setAntiAlias(true);
flags.setColor(AshColorProvider::Get()->DeprecatedGetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive,
kUnifiedMenuButtonColor));
flags.setColor(AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive));
flags.setStyle(cc::PaintFlags::kFill_Style);
canvas->DrawRoundRect(rect, kTrayItemCornerRadius, flags);
......
......@@ -74,9 +74,8 @@ gfx::Size TopShortcutButton::CalculatePreferredSize() const {
void TopShortcutButton::PaintButtonContents(gfx::Canvas* canvas) {
cc::PaintFlags flags;
flags.setAntiAlias(true);
flags.setColor(AshColorProvider::Get()->DeprecatedGetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive,
kUnifiedMenuButtonColor));
flags.setColor(AshColorProvider::Get()->GetControlsLayerColor(
AshColorProvider::ControlsLayerType::kControlBackgroundColorInactive));
flags.setStyle(cc::PaintFlags::kFill_Style);
canvas->DrawPath(views::GetHighlightPath(this), flags);
......
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