Commit 34d54086 authored by minch's avatar minch Committed by Commit Bot

dark_mode: Clean up TrayPopupItemStyle.

CONNECTED and SUB_HEADER are actually never be used while
|use_unified_theme_| is false. This cl goes to remove the unnecessary
logic on |use_unified_theme_|.

May do more refactoring of TrayPopupItemStyle after the simplification.

TEST=IME tray and palette tray do not change visually
(these are the only cases where use_unified_theme_ == false is used.)

Bug: 982950
Change-Id: I71885bbff4b178cf2907e92bc539d0cdf650ce10
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/1767095
Commit-Queue: Min Chen <minch@chromium.org>
Reviewed-by: default avatarTetsui Ohkubo <tetsui@chromium.org>
Cr-Commit-Position: refs/heads/master@{#690108}
parent 6617e7d5
...@@ -73,8 +73,7 @@ SkColor TrayPopupItemStyle::GetTextColor() const { ...@@ -73,8 +73,7 @@ SkColor TrayPopupItemStyle::GetTextColor() const {
case ColorStyle::DISABLED: case ColorStyle::DISABLED:
return SkColorSetA(kBaseTextColor, kDisabledAlpha); return SkColorSetA(kBaseTextColor, kDisabledAlpha);
case ColorStyle::CONNECTED: case ColorStyle::CONNECTED:
return use_unified_theme_ ? gfx::kGoogleGreenDark600 return gfx::kGoogleGreenDark600;
: gfx::kGoogleGreen700;
} }
NOTREACHED(); NOTREACHED();
return gfx::kPlaceholderColor; return gfx::kPlaceholderColor;
...@@ -96,17 +95,8 @@ void TrayPopupItemStyle::SetupLabel(views::Label* label) const { ...@@ -96,17 +95,8 @@ void TrayPopupItemStyle::SetupLabel(views::Label* label) const {
gfx::Font::Weight::MEDIUM)); gfx::Font::Weight::MEDIUM));
break; break;
case FontStyle::SUB_HEADER: case FontStyle::SUB_HEADER:
label->SetFontList(base_font_list.Derive(use_unified_theme_ ? 4 : 1, label->SetFontList(base_font_list.Derive(4, gfx::Font::NORMAL,
gfx::Font::NORMAL,
gfx::Font::Weight::MEDIUM)); gfx::Font::Weight::MEDIUM));
label->SetEnabledColor(
use_unified_theme_
? AshColorProvider::Get()->DeprecatedGetContentLayerColor(
AshColorProvider::ContentLayerType::kTextPrimary,
kUnifiedMenuTextColor)
: label->GetNativeTheme()->GetSystemColor(
ui::NativeTheme::kColorId_ProminentButtonColor));
label->SetAutoColorReadabilityEnabled(false);
break; break;
case FontStyle::DETAILED_VIEW_LABEL: case FontStyle::DETAILED_VIEW_LABEL:
case FontStyle::SYSTEM_INFO: case FontStyle::SYSTEM_INFO:
......
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