Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(7180)

Unified Diff: chrome/browser/themes/theme_service.cc

Issue 2629293002: Try to improve toolbar separator coloration for themed browser windows. (Closed)
Patch Set: revert Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/libgtkui/gtk_ui.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..09fab6d80ea953035e015cb7fc046087cd108c19 100644
--- a/chrome/browser/themes/theme_service.cc
+++ b/chrome/browser/themes/theme_service.cc
@@ -477,16 +477,28 @@ 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.
+ // 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);
Evan Stade 2017/01/24 00:46:08 tangent: I noticed that on many themes this is bet
Peter Kasting 2017/01/24 21:43:33 I agree; see https://bugs.chromium.org/p/chromium/
- 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 12.5% of bookmark text color as separator color.
+ return color_utils::AlphaBlend(
+ GetColor(ThemeProperties::COLOR_BOOKMARK_TEXT, incognito),
+ GetColor(ThemeProperties::COLOR_TOOLBAR, incognito), 0x20);
case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT:
return IncreaseLightness(GetColor(kNtpText, incognito), 0.30);
case ThemeProperties::COLOR_NTP_SECTION_HEADER_TEXT_HOVER:
« no previous file with comments | « chrome/browser/themes/theme_properties.cc ('k') | chrome/browser/ui/libgtkui/gtk_ui.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698