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

dark_mode: Add colors for radio button.

Bug: 1133748
Change-Id: I33c8d0d97e20ba86943332d41a9ee68ae1fbf4be
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2481463Reviewed-by: default avatarAhmed Fakhry <afakhry@chromium.org>
Commit-Queue: Min Chen <minch@chromium.org>
Cr-Commit-Position: refs/heads/master@{#818722}
parent 587ab093
...@@ -222,9 +222,11 @@ SkColor AshColorProvider::GetContentLayerColor(ContentLayerType type) const { ...@@ -222,9 +222,11 @@ SkColor AshColorProvider::GetContentLayerColor(ContentLayerType type) const {
case ContentLayerType::kButtonIconColor: case ContentLayerType::kButtonIconColor:
case ContentLayerType::kAppStateIndicatorColor: case ContentLayerType::kAppStateIndicatorColor:
case ContentLayerType::kSliderColorInactive: case ContentLayerType::kSliderColorInactive:
case ContentLayerType::kRadioColorInactive:
return is_dark_mode ? gfx::kGoogleGrey200 : gfx::kGoogleGrey700; return is_dark_mode ? gfx::kGoogleGrey200 : gfx::kGoogleGrey700;
case ContentLayerType::kButtonLabelColorBlue: case ContentLayerType::kButtonLabelColorBlue:
case ContentLayerType::kSliderColorActive: case ContentLayerType::kSliderColorActive:
case ContentLayerType::kRadioColorActive:
return is_dark_mode ? gfx::kGoogleBlue300 : gfx::kGoogleBlue600; return is_dark_mode ? gfx::kGoogleBlue300 : gfx::kGoogleBlue600;
case ContentLayerType::kButtonLabelColorPrimary: case ContentLayerType::kButtonLabelColorPrimary:
case ContentLayerType::kButtonIconColorPrimary: case ContentLayerType::kButtonIconColorPrimary:
......
...@@ -115,7 +115,11 @@ class ASH_EXPORT AshColorProvider : public SessionObserver { ...@@ -115,7 +115,11 @@ class ASH_EXPORT AshColorProvider : public SessionObserver {
// Color for slider. // Color for slider.
kSliderColorActive, kSliderColorActive,
kSliderColorInactive kSliderColorInactive,
// Color for radio button.
kRadioColorActive,
kRadioColorInactive,
}; };
// Types of ash styled buttons. // Types of ash styled buttons.
......
...@@ -31,8 +31,17 @@ class TrayRadioButton : public views::RadioButton { ...@@ -31,8 +31,17 @@ class TrayRadioButton : public views::RadioButton {
SetCallback(views::Button::PressedCallback(listener, this)); SetCallback(views::Button::PressedCallback(listener, this));
} }
// views::RadioButton:
SkColor GetIconImageColor(int icon_state) const override {
return AshColorProvider::Get()->GetContentLayerColor(
icon_state & IconState::CHECKED
? AshColorProvider::ContentLayerType::kRadioColorActive
: AshColorProvider::ContentLayerType::kRadioColorInactive);
}
// views::RadioButton: // views::RadioButton:
void OnThemeChanged() override { void OnThemeChanged() override {
views::RadioButton::OnThemeChanged();
TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SMALL_TITLE); TrayPopupItemStyle style(TrayPopupItemStyle::FontStyle::SMALL_TITLE);
SetEnabledTextColors(style.GetTextColor()); SetEnabledTextColors(style.GetTextColor());
style.SetupLabel(label()); style.SetupLabel(label());
......
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