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

Remove deprecated calls for kTextPrimary color in ash/system

Bug: 960117
Change-Id: Ic71983cb3882f3579fddbd23299fd7b0691bd07b
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2015827Reviewed-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@{#734256}
parent 2185e1dc
......@@ -21,7 +21,6 @@ constexpr SkColor kUnifiedMenuBackgroundColorWithBlur =
SkColorSetA(kUnifiedMenuBackgroundColor, 0x99); // 60%
constexpr SkColor kNotificationBackgroundColor = SK_ColorWHITE;
constexpr SkColor kUnifiedMenuTextColor = gfx::kGoogleGrey100;
constexpr SkColor kUnifiedMenuButtonColor =
SkColorSetA(gfx::kGoogleGrey200, 0x14);
constexpr SkColor kUnifiedMenuButtonColorActive = gfx::kGoogleBlueDark600;
......
......@@ -66,10 +66,9 @@ class ImeListItemView : public ActionableView {
// |id_label| contains the IME short name (e.g., 'US', 'GB', 'IT').
views::Label* id_label = TrayPopupUtils::CreateDefaultLabel();
if (use_unified_theme) {
id_label->SetEnabledColor(
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
kUnifiedMenuTextColor));
id_label->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
AshColorProvider::AshColorMode::kDark));
id_label->SetAutoColorReadabilityEnabled(false);
}
id_label->SetText(id);
......
......@@ -53,9 +53,9 @@ class LocaleItem : public ActionableView {
views::Label* iso_code_label = TrayPopupUtils::CreateDefaultLabel();
iso_code_label->SetEnabledColor(
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
kUnifiedMenuTextColor));
AshColorProvider::AshColorMode::kDark));
iso_code_label->SetAutoColorReadabilityEnabled(false);
iso_code_label->SetText(base::i18n::ToUpper(
base::UTF8ToUTF16(l10n_util::GetLanguage(iso_code))));
......
......@@ -240,9 +240,8 @@ class ScrollContentsView : public views::View {
class EmptyNotifierView : public views::View {
public:
EmptyNotifierView() {
const SkColor text_color =
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
ContentLayerType::kTextPrimary, kUnifiedMenuTextColor);
const SkColor text_color = AshColorProvider::Get()->GetContentLayerColor(
ContentLayerType::kTextPrimary, AshColorMode::kDark);
auto layout = std::make_unique<views::BoxLayout>(
views::BoxLayout::Orientation::kVertical, gfx::Insets(), 0);
layout->set_main_axis_alignment(
......@@ -292,9 +291,8 @@ NotifierSettingsView::NotifierButton::NotifierButton(
auto checkbox =
std::make_unique<views::Checkbox>(base::string16(), this /* listener */);
name_view->SetAutoColorReadabilityEnabled(false);
name_view->SetEnabledColor(
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
ContentLayerType::kTextPrimary, kUnifiedMenuTextColor));
name_view->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
ContentLayerType::kTextPrimary, AshColorMode::kDark));
name_view->SetSubpixelRenderingEnabled(false);
// "Roboto-Regular, 13sp" is specified in the mock.
name_view->SetFontList(
......@@ -438,9 +436,8 @@ NotifierSettingsView::NotifierSettingsView() {
auto quiet_mode_label =
std::make_unique<views::Label>(l10n_util::GetStringUTF16(
IDS_ASH_MESSAGE_CENTER_QUIET_MODE_BUTTON_TOOLTIP));
const SkColor text_color =
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
ContentLayerType::kTextPrimary, kUnifiedMenuTextColor);
const SkColor text_color = AshColorProvider::Get()->GetContentLayerColor(
ContentLayerType::kTextPrimary, AshColorMode::kDark);
quiet_mode_label->SetHorizontalAlignment(gfx::ALIGN_LEFT);
// "Roboto-Regular, 13sp" is specified in the mock.
quiet_mode_label->SetFontList(
......
......@@ -59,11 +59,10 @@ TrayPopupItemStyle::~TrayPopupItemStyle() = default;
SkColor TrayPopupItemStyle::GetTextColor() const {
const SkColor kBaseTextColor =
use_unified_theme_
? AshColorProvider::Get()->DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
kUnifiedMenuTextColor)
: SkColorSetA(SK_ColorBLACK, 0xDE);
use_unified_theme_ ? AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
AshColorProvider::AshColorMode::kDark)
: SkColorSetA(SK_ColorBLACK, 0xDE);
switch (color_style_) {
case ColorStyle::ACTIVE:
......
......@@ -270,9 +270,8 @@ void FeaturePodLabelButton::ShowDetailedViewArrow() {
void FeaturePodLabelButton::OnEnabledChanged() {
const AshColorProvider* color_provider = AshColorProvider::Get();
const SkColor primary_text_color =
color_provider->DeprecatedGetContentLayerColor(
ContentLayerType::kTextPrimary, kUnifiedMenuTextColor);
const SkColor primary_text_color = color_provider->GetContentLayerColor(
ContentLayerType::kTextPrimary, AshColorMode::kDark);
const SkColor secondary_text_color = color_provider->GetContentLayerColor(
ContentLayerType::kTextSecondary, AshColorMode::kDark);
label_->SetEnabledColor(
......
......@@ -37,10 +37,9 @@ void ShowLockScreenNotificationSettings() {
NotificationHiddenView::NotificationHiddenView() {
auto* label = new views::Label;
label->SetEnabledColor(
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
kUnifiedMenuTextColor));
label->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
AshColorProvider::AshColorMode::kDark));
label->SetAutoColorReadabilityEnabled(false);
label->SetText(
l10n_util::GetStringUTF16(IDS_ASH_MESSAGE_CENTER_LOCKSCREEN_UNIFIED));
......
......@@ -21,8 +21,9 @@ namespace ash {
RoundedLabelButton::RoundedLabelButton(views::ButtonListener* listener,
const base::string16& text)
: views::LabelButton(listener, text) {
SetEnabledTextColors(AshColorProvider::Get()->DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary, kUnifiedMenuTextColor));
SetEnabledTextColors(AshColorProvider::Get()->GetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
AshColorProvider::AshColorMode::kDark));
SetHorizontalAlignment(gfx::ALIGN_CENTER);
SetBorder(views::CreateEmptyBorder(gfx::Insets()));
label()->SetElideBehavior(gfx::NO_ELIDE);
......
......@@ -98,9 +98,8 @@ DateView::DateView(UnifiedSystemTrayController* controller)
label_->SetAutoColorReadabilityEnabled(false);
label_->SetSubpixelRenderingEnabled(false);
label_->SetEnabledColor(
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
ContentLayerType::kTextPrimary, kUnifiedMenuTextColor));
label_->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
ContentLayerType::kTextPrimary, AshColorMode::kDark));
Update();
Shell::Get()->system_tray_model()->clock()->AddObserver(this);
......
......@@ -97,9 +97,8 @@ AddUserButton::AddUserButton(UserChooserDetailedViewController* controller)
auto* label = new views::Label(
l10n_util::GetStringUTF16(IDS_ASH_STATUS_TRAY_SIGN_IN_ANOTHER_ACCOUNT));
label->SetEnabledColor(
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
ContentLayerType::kTextPrimary, kUnifiedMenuTextColor));
label->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
ContentLayerType::kTextPrimary, AshColorMode::kDark));
label->SetAutoColorReadabilityEnabled(false);
label->SetSubpixelRenderingEnabled(false);
AddChildView(label);
......@@ -139,9 +138,8 @@ class Separator : public views::View {
views::View* CreateAddUserErrorView(const base::string16& message) {
auto* label = new views::Label(message);
label->SetEnabledColor(
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
ContentLayerType::kTextPrimary, kUnifiedMenuTextColor));
label->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
ContentLayerType::kTextPrimary, AshColorMode::kDark));
label->SetAutoColorReadabilityEnabled(false);
label->SetSubpixelRenderingEnabled(false);
label->SetBorder(
......@@ -230,9 +228,8 @@ UserItemButton::UserItemButton(int user_index,
Shell::Get()->session_controller()->GetUserSession(user_index);
name_->SetText(base::UTF8ToUTF16(user_session->user_info.display_name));
name_->SetEnabledColor(
AshColorProvider::Get()->DeprecatedGetContentLayerColor(
ContentLayerType::kTextPrimary, kUnifiedMenuTextColor));
name_->SetEnabledColor(AshColorProvider::Get()->GetContentLayerColor(
ContentLayerType::kTextPrimary, AshColorMode::kDark));
name_->SetAutoColorReadabilityEnabled(false);
name_->SetSubpixelRenderingEnabled(false);
vertical_labels->AddChildView(name_);
......
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