Skip to content

Commit

Permalink
Merge pull request #10402 from brave/pr10398_fix_accent_border_issue_…
Browse files Browse the repository at this point in the history
…on_win_1.31.x

Fixed accent top border is only visible on Windows (uplift to 1.31.x)
  • Loading branch information
kjozwiak authored Oct 8, 2021
2 parents 61ae7b4 + 25a0880 commit 7bd0d0e
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions browser/themes/brave_theme_helper_win.cc
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,9 @@ SkColor BraveThemeHelperWin::GetDefaultColor(
const CustomThemeSupplier* theme_supplier) const {
// Prevent dcheck in chrome/browser/themes/theme_properties.cc(384)
// It assumes these ids are handled in theme service.
if (DwmColorsAllowed(theme_supplier)) {
if (id == ThemeProperties::COLOR_ACCENT_BORDER_ACTIVE)
return dwm_accent_border_color_;
// In Windows 10, native inactive borders are #555555 with 50% alpha.
if (id == ThemeProperties::COLOR_ACCENT_BORDER_INACTIVE)
return SkColorSetARGB(0x80, 0x55, 0x55, 0x55);
if (id == ThemeProperties::COLOR_ACCENT_BORDER_ACTIVE ||
id == ThemeProperties::COLOR_ACCENT_BORDER_INACTIVE) {
return ThemeHelperWin::GetDefaultColor(id, incognito, theme_supplier);
}
// Skip ThemeHelperWin::GetDefaultColor() to prevent using dwm frame color.
return BraveThemeHelper::GetDefaultColor(id, incognito, theme_supplier);
Expand Down

0 comments on commit 7bd0d0e

Please sign in to comment.