Chromium Code Reviews| Index: chrome/browser/themes/theme_service.cc |
| diff --git a/chrome/browser/themes/theme_service.cc b/chrome/browser/themes/theme_service.cc |
| index 9f5b82a5d0c094aaec0878b5f62ddfe2adbdfcb7..659adf52357a478eeb94cd1f59112e4ef2cade93 100644 |
| --- a/chrome/browser/themes/theme_service.cc |
| +++ b/chrome/browser/themes/theme_service.cc |
| @@ -477,16 +477,27 @@ SkColor ThemeService::GetDefaultColor(int id, bool incognito) const { |
| if (UsingDefaultTheme()) |
| break; |
| return GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito); |
| + case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: { |
| + // Same as the normal toolbar separator, but with increased luminance. |
|
Peter Kasting
2017/01/17 20:51:25
It seems kind of random that we increase the lumin
Evan Stade
2017/01/18 00:16:59
In the dark case (e.g. incognito) it is actually m
Peter Kasting
2017/01/18 00:40:16
Which seems like a bug. Why would we want a stron
Evan Stade
2017/01/24 00:46:08
In practice, it doesn't look like a bug. You can t
Peter Kasting
2017/01/24 21:43:33
Staring at the current behavior more closely, I th
|
| + // Either double it or halve the distance to 1.0, whichever is less of a |
| + // difference. |
| + color_utils::HSL hsl; |
| + color_utils::SkColorToHSL( |
| + GetColor(ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR, incognito), |
| + &hsl); |
| + hsl.l = std::min((hsl.l + 1) / 2, hsl.l * 2); |
| + return color_utils::HSLToSkColor(hsl, SK_AlphaOPAQUE); |
| + } |
| case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_BACKGROUND: |
| if (UsingDefaultTheme()) |
| break; |
| return GetColor(ThemeProperties::COLOR_TOOLBAR, incognito); |
| - case ThemeProperties::COLOR_DETACHED_BOOKMARK_BAR_SEPARATOR: |
| + case ThemeProperties::COLOR_TOOLBAR_BOTTOM_SEPARATOR: |
| if (UsingDefaultTheme()) |
| break; |
| - // Use 50% of bookmark text color as separator color. |
| - return SkColorSetA( |
| - GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 128); |
| + // Use 25% of bookmark text color as separator color. |
| + return color_utils::BlendTowardOppositeLuma( |
| + GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito), 0xBF); |
|
Peter Kasting
2017/01/17 20:51:25
Doesn't blending toward the opposite luma here ass
Evan Stade
2017/01/18 00:16:59
I think it's a safe assumption that blending towar
Peter Kasting
2017/01/18 00:40:16
The effect of the previous alpha-blend was, basica
Evan Stade
2017/01/24 00:46:08
I'm not sure I follow because there's no way to pr
Peter Kasting
2017/01/24 21:43:33
I just meant, if we're trying to guarantee the sep
|
| case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT: |
| return IncreaseLightness(GetColor(kNtpText, incognito), 0.30); |
| case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER: |