Skip to content

Commit

Permalink
Merge pull request #10908 from brave/maxk-fix-task-manager-colors
Browse files Browse the repository at this point in the history
[Cr96-followup] Fixes Task Manager colors.
  • Loading branch information
mkarolin authored Nov 8, 2021
2 parents 070fe27 + 503fff4 commit 0f42a66
Showing 1 changed file with 44 additions and 10 deletions.
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

0 comments on commit 0f42a66

Please sign in to comment.