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

Unified Diff: chrome/browser/dom_ui/dom_ui_theme_source.cc

Issue 164386: Merge 23081 - With the recent NNTP changes, we change the way themes work th... (Closed) Base URL: svn://chrome-svn/chrome/branches/195/src/
Patch Set: Created 11 years, 4 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/browser_theme_provider.cc ('k') | chrome/browser/resources/new_new_tab.css » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/dom_ui/dom_ui_theme_source.cc
===================================================================
--- chrome/browser/dom_ui/dom_ui_theme_source.cc (revision 23165)
+++ chrome/browser/dom_ui/dom_ui_theme_source.cc (working copy)
@@ -106,13 +106,24 @@
SkColor color_section_link =
tp->GetColor(BrowserThemeProvider::COLOR_NTP_SECTION_LINK);
- // Generate a lighter color.
- skia::HSL section_lighter;
- skia::SkColorToHSL(color_section, section_lighter);
- section_lighter.l += (1 - section_lighter.l) * 0.33;
- SkColor color_section_lighter =
- skia::HSLToSkColor(SkColorGetA(color_section), section_lighter);
+ SkColor color_header =
+ tp->GetColor(BrowserThemeProvider::COLOR_NTP_HEADER);
+ // Generate a lighter color for the header gradients.
+ skia::HSL header_lighter;
+ skia::SkColorToHSL(color_header, header_lighter);
+ header_lighter.l += (1 - header_lighter.l) * 0.33;
+ SkColor color_header_gradient_light =
+ skia::HSLToSkColor(SkColorGetA(color_header), header_lighter);
+ // Generate section border color from the header color. See
+ // BookmarkBarView::Paint for how we do this for the bookmark bar
+ // borders.
+ SkColor color_section_border =
+ SkColorSetARGB(80,
+ SkColorGetR(color_header),
+ SkColorGetG(color_header),
+ SkColorGetB(color_header));
+
// Generate the replacements.
std::vector<string16> subst;
// A second list of replacements, each of which must be in $$x format,
@@ -128,13 +139,15 @@
subst.push_back(UTF8ToUTF16(GetNewTabBackgroundCSS(false))); // $3
subst.push_back(UTF8ToUTF16(GetNewTabBackgroundCSS(true))); // $4
subst.push_back(UTF8ToUTF16(GetNewTabBackgroundTilingCSS())); // $5
- subst.push_back(SkColorToRGBAString(color_section)); // $6
- subst.push_back(SkColorToRGBAString(color_section_lighter)); // $7
+ subst.push_back(SkColorToRGBAString(color_header)); // $6
+ subst.push_back(SkColorToRGBAString(color_header_gradient_light)); // $7
subst.push_back(SkColorToRGBAString(color_text)); // $8
subst.push_back(SkColorToRGBAString(color_link)); // $9
- subst2.push_back(SkColorToRGBAString(color_section_text)); // $$1
- subst2.push_back(SkColorToRGBAString(color_section_link)); // $$2
+ subst2.push_back(SkColorToRGBAString(color_section)); // $$1
+ subst2.push_back(SkColorToRGBAString(color_section_border)); // $$2
+ subst2.push_back(SkColorToRGBAString(color_section_text)); // $$3
+ subst2.push_back(SkColorToRGBAString(color_section_link)); // $$4
// Get our template.
static const StringPiece new_tab_theme_css(
Property changes on: chrome\browser\dom_ui\dom_ui_theme_source.cc
___________________________________________________________________
Modified: svn:mergeinfo
Merged /trunk/src/chrome/browser/dom_ui/dom_ui_theme_source.cc:r23081
« no previous file with comments | « chrome/browser/browser_theme_provider.cc ('k') | chrome/browser/resources/new_new_tab.css » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698