Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Cr96-followup] Fixes Task Manager colors. #10908

Merged
merged 1 commit into from
Nov 8, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 44 additions & 10 deletions chromium_src/ui/color/ui_color_mixer.cc
Original file line number Diff line number Diff line change
Expand Up @@ -14,29 +14,63 @@ void AddBraveUiColorMixer(ColorProvider* provider,
bool high_contrast) {
ColorMixer& mixer = provider->AddMixer();

// For deprecated kColorId_ButtonEnabledColor
mixer[kColorButtonForeground] = {dark_window ? SK_ColorWHITE
: gfx::kBraveGrey800};
mixer[kColorButtonForegroundChecked] = {kColorButtonForeground};
// For deprecated kColorId_ProminentButtonFocusedColor
mixer[kColorButtonBackgroundProminentFocused] = {gfx::kBraveColorBrand};
// For deprecated kColorId_ProminentButtonColor
mixer[kColorButtonBackgroundProminent] = {gfx::kBraveColorBrand};
// --------------------------------------------------------------------------
// Border colors
// --------------------------------------------------------------------------
// For deprecated kColorId_FocusedBorderColor
mixer[kColorFocusableBorderFocused] = {gfx::kBraveColorBrand};

// --------------------------------------------------------------------------
// Button colors
// --------------------------------------------------------------------------
// For deprecated kColorId_ProminentButtonColor
mixer[kColorButtonBackgroundProminent] = {gfx::kBraveColorBrand};
// For deprecated kColorId_ProminentButtonDisabledColor
mixer[kColorButtonBackgroundProminentDisabled] = {gfx::kGoogleGrey800};
// For deprecated kColorId_TextOnProminentButtonColor
mixer[kColorButtonForegroundProminent] = {SK_ColorWHITE};
// For deprecated kColorId_ProminentButtonFocusedColor
mixer[kColorButtonBackgroundProminentFocused] = {gfx::kBraveColorBrand};
// For deprecated kColorId_ButtonBorderColor
// TODO(simonhong): Add this color to palette.
mixer[kColorButtonBorder] = {SkColorSetRGB(0xc3, 0xc4, 0xcf)};
// For deprecated kColorId_ButtonEnabledColor
mixer[kColorButtonForeground] = {dark_window ? SK_ColorWHITE
: gfx::kBraveGrey800};
mixer[kColorButtonForegroundChecked] = {kColorButtonForeground};
// For deprecated kColorId_TextOnProminentButtonColor
mixer[kColorButtonForegroundProminent] = {SK_ColorWHITE};

// --------------------------------------------------------------------------
// Label colors
// --------------------------------------------------------------------------
// For deprecated kColorId_LabelEnabledColor
mixer[kColorLabelForeground] = {kColorButtonForeground};

// --------------------------------------------------------------------------
// Link colors
// --------------------------------------------------------------------------
// For deprecated kColorId_LinkEnabled & kColorId_LinkPressed
mixer[kColorLinkForeground] = {dark_window ? gfx::kBraveColorOrange300
: gfx::kBraveColorBrand};
mixer[kColorLinkForegroundPressed] = {kColorLinkForeground};

// --------------------------------------------------------------------------
// Table colors (e.g. Task Manager)
// --------------------------------------------------------------------------
// For deprecated kColorId_TableSelectionBackgroundFocused and
// kColorId_TableSelectionBackgroundUnfocused (which were
// AlphaBlend(kColorId_ProminentButtonColor, kColorId_WindowBackground,
// SkAlpha{0x3C}))
mixer[kColorTableBackgroundSelectedFocused] =
AlphaBlend(gfx::kBraveColorBrand, kColorPrimaryBackground, 0x3C);
mixer[kColorTableBackgroundSelectedUnfocused] = {
kColorTableBackgroundSelectedFocused};
// For deprecated kColorId_TableGroupingIndicatorColor (which was the same as
// kColorId_FocusedBorderColor)
mixer[kColorTableGroupingIndicator] = {gfx::kBraveColorBrand};

// --------------------------------------------------------------------------
// Text colors
// --------------------------------------------------------------------------
// For deprecated kColorId_TextfieldSelectionBackgroundFocused
mixer[kColorTextfieldSelectionBackground] = {
dark_window ? gfx::kGoogleBlue800 : gfx::kGoogleBlue200};
Expand Down