Commit c6d61163 authored by Yulun Wu's avatar Yulun Wu Committed by Commit Bot

Restore classic shelf button colors.

This addresses the changes in these CLs

https://chromium-review.googlesource.com/c/chromium/src/+/2376417
https://chromium-review.googlesource.com/c/chromium/src/+/2378801

Bug: 1134854
Change-Id: I360e46cc4d0e8247eed799b7f1c7b1d1c4f9da5d
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2447045Reviewed-by: default avatarYulun Wu <yulunwu@chromium.org>
Reviewed-by: default avatarXiyuan Xia <xiyuan@chromium.org>
Commit-Queue: Yulun Wu <yulunwu@chromium.org>
Cr-Commit-Position: refs/heads/master@{#814035}
parent 49b2c81a
...@@ -10,6 +10,8 @@ ...@@ -10,6 +10,8 @@
#include "ash/shelf/shelf_focus_cycler.h" #include "ash/shelf/shelf_focus_cycler.h"
#include "ash/strings/grit/ash_strings.h" #include "ash/strings/grit/ash_strings.h"
#include "ash/style/ash_color_provider.h" #include "ash/style/ash_color_provider.h"
#include "ash/style/default_color_constants.h"
#include "ash/style/default_colors.h"
#include "ash/wm/window_state.h" #include "ash/wm/window_state.h"
#include "ash/wm/window_util.h" #include "ash/wm/window_util.h"
#include "base/metrics/user_metrics.h" #include "base/metrics/user_metrics.h"
...@@ -42,9 +44,9 @@ void BackButton::PaintButtonContents(gfx::Canvas* canvas) { ...@@ -42,9 +44,9 @@ void BackButton::PaintButtonContents(gfx::Canvas* canvas) {
// Use PaintButtonContents instead of SetImage so the icon gets drawn at // Use PaintButtonContents instead of SetImage so the icon gets drawn at
// |GetCenterPoint| coordinates instead of always in the center. // |GetCenterPoint| coordinates instead of always in the center.
gfx::ImageSkia img = CreateVectorIcon( gfx::ImageSkia img = CreateVectorIcon(
kShelfBackIcon, kShelfBackIcon, DeprecatedGetContentLayerColor(
AshColorProvider::Get()->GetContentLayerColor( AshColorProvider::ContentLayerType::kButtonIconColor,
AshColorProvider::ContentLayerType::kButtonIconColor)); kShelfButtonColor));
canvas->DrawImageInt(img, GetCenterPoint().x() - img.width() / 2, canvas->DrawImageInt(img, GetCenterPoint().x() - img.width() / 2,
GetCenterPoint().y() - img.height() / 2); GetCenterPoint().y() - img.height() / 2);
} }
......
...@@ -14,6 +14,8 @@ ...@@ -14,6 +14,8 @@
#include "ash/shelf/shelf_navigation_widget.h" #include "ash/shelf/shelf_navigation_widget.h"
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/style/ash_color_provider.h" #include "ash/style/ash_color_provider.h"
#include "ash/style/default_color_constants.h"
#include "ash/style/default_colors.h"
#include "ash/wm/tablet_mode/tablet_mode_controller.h" #include "ash/wm/tablet_mode/tablet_mode_controller.h"
#include "base/check_op.h" #include "base/check_op.h"
#include "base/metrics/user_metrics.h" #include "base/metrics/user_metrics.h"
...@@ -141,8 +143,9 @@ void HomeButton::PaintButtonContents(gfx::Canvas* canvas) { ...@@ -141,8 +143,9 @@ void HomeButton::PaintButtonContents(gfx::Canvas* canvas) {
cc::PaintFlags fg_flags; cc::PaintFlags fg_flags;
fg_flags.setAntiAlias(true); fg_flags.setAntiAlias(true);
fg_flags.setStyle(cc::PaintFlags::kStroke_Style); fg_flags.setStyle(cc::PaintFlags::kStroke_Style);
fg_flags.setColor(AshColorProvider::Get()->GetContentLayerColor( fg_flags.setColor(DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kButtonIconColor)); AshColorProvider::ContentLayerType::kButtonIconColor,
kShelfButtonColor));
if (controller_.IsAssistantAvailable()) { if (controller_.IsAssistantAvailable()) {
// active: 100% alpha, inactive: 54% alpha // active: 100% alpha, inactive: 54% alpha
......
...@@ -19,7 +19,10 @@ constexpr SkColor kPowerButtonMenuFullscreenShieldColor = SK_ColorBLACK; ...@@ -19,7 +19,10 @@ constexpr SkColor kPowerButtonMenuFullscreenShieldColor = SK_ColorBLACK;
constexpr SkColor kLoginShelfButtonLabelColor = gfx::kGoogleGrey100; constexpr SkColor kLoginShelfButtonLabelColor = gfx::kGoogleGrey100;
constexpr SkColor kLoginShelfButtonIconColor = SkColorSetRGB(0xEB, 0xEA, 0xED); constexpr SkColor kLoginShelfButtonIconColor = SkColorSetRGB(0xEB, 0xEA, 0xED);
constexpr SkColor kLoginBackgroundBaseColor = SK_ColorBLACK; constexpr SkColor kLoginBackgroundBaseColor = SK_ColorBLACK;
// Colors for shelf.
constexpr SkColor kDefaultShelfInkDropColor = SK_ColorBLACK; constexpr SkColor kDefaultShelfInkDropColor = SK_ColorBLACK;
constexpr float kDefaultShelfInkDropOpacity = 0.2f; constexpr float kDefaultShelfInkDropOpacity = 0.2f;
constexpr SkColor kShelfButtonColor = SK_ColorWHITE;
#endif // ASH_STYLE_DEFAULT_COLOR_CONSTANTS_H_ #endif // ASH_STYLE_DEFAULT_COLOR_CONSTANTS_H_
...@@ -11,6 +11,8 @@ ...@@ -11,6 +11,8 @@
#include "ash/shell.h" #include "ash/shell.h"
#include "ash/strings/grit/ash_strings.h" #include "ash/strings/grit/ash_strings.h"
#include "ash/style/ash_color_provider.h" #include "ash/style/ash_color_provider.h"
#include "ash/style/default_color_constants.h"
#include "ash/style/default_colors.h"
#include "ash/system/tray/tray_constants.h" #include "ash/system/tray/tray_constants.h"
#include "ash/system/tray/tray_container.h" #include "ash/system/tray/tray_container.h"
#include "ash/wm/mru_window_tracker.h" #include "ash/wm/mru_window_tracker.h"
...@@ -38,8 +40,9 @@ OverviewButtonTray::OverviewButtonTray(Shelf* shelf) ...@@ -38,8 +40,9 @@ OverviewButtonTray::OverviewButtonTray(Shelf* shelf)
scoped_session_observer_(this) { scoped_session_observer_(this) {
gfx::ImageSkia image = gfx::CreateVectorIcon( gfx::ImageSkia image = gfx::CreateVectorIcon(
kShelfOverviewIcon, kShelfOverviewIcon,
AshColorProvider::Get()->GetContentLayerColor( DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kButtonIconColor)); AshColorProvider::ContentLayerType::kButtonIconColor,
kShelfButtonColor));
icon_->SetImage(image); icon_->SetImage(image);
const int vertical_padding = (kTrayItemSize - image.height()) / 2; const int vertical_padding = (kTrayItemSize - image.height()) / 2;
const int horizontal_padding = (kTrayItemSize - image.width()) / 2; const int horizontal_padding = (kTrayItemSize - image.width()) / 2;
......
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